|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.annotation.Resource; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import cn.hutool.core.collection.CollUtil; | 
|---|
|  |  |  | import cn.hutool.core.util.DesensitizedUtil; | 
|---|
|  |  |  | import com.panzhihua.common.model.dtos.common.PageComActEasyPhotoEvaluateDto; | 
|---|
|  |  |  | import com.panzhihua.common.model.vos.common.ComActEasyPhotoHandlerVo; | 
|---|
|  |  |  | import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO; | 
|---|
|  |  |  | import com.panzhihua.service_community.entity.ComActEasyPhotoEvaluate; | 
|---|
|  |  |  | import com.panzhihua.service_community.entity.ComActEasyPhotoHandler; | 
|---|
|  |  |  | import com.panzhihua.service_community.entity.SysTemplateConfig; | 
|---|
|  |  |  | import com.panzhihua.service_community.service.ComActEasyPhotoHandlerService; | 
|---|
|  |  |  | import org.springframework.beans.BeanUtils; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  | import org.springframework.util.CollectionUtils; | 
|---|
|  |  |  | 
|---|
|  |  |  | private ComActActivityDAO comActActivityDAO; | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private SysTemplateConfigDao sysTemplateConfigDao; | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private ComActEasyPhotoHandlerService easyPhotoHandlerService; | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private ComActEasyPhotoEvaluateMapper comActEasyPhotoEvaluateMapper; | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private ComActReserveRecordMapper comActReserveRecordMapper; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 分页查询随手拍 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (comActEasyPhotoVO1.getActivityId() != null | 
|---|
|  |  |  | && comActEasyPhotoVO1.getStatus().equals(ComActEasyPhotoDO.status.ywc)) { | 
|---|
|  |  |  | && comActEasyPhotoVO1.getStatus().equals(ComActEasyPhotoDO.status.dpj)) { | 
|---|
|  |  |  | // 查询随手拍活动 | 
|---|
|  |  |  | ComActEasyPhotoActivityDO photoActivityDO = | 
|---|
|  |  |  | comActEasyPhotoActivityMapper.selectById(comActEasyPhotoVO1.getActivityId()); | 
|---|
|  |  |  | 
|---|
|  |  |  | comActEasyPhotoVO.setEasyPhotoActivityVO(easyPhotoActivityVO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | PageComActEasyPhotoEvaluateDto evaluateDto = new PageComActEasyPhotoEvaluateDto(); | 
|---|
|  |  |  | evaluateDto.setServiceId(id); | 
|---|
|  |  |  | evaluateDto.setServiceType(ComActEasyPhotoEvaluate.ServiceType.SSP); | 
|---|
|  |  |  | comActEasyPhotoVO.setEvaluateList(comActEasyPhotoEvaluateMapper.queryAllByList(evaluateDto)); | 
|---|
|  |  |  | return R.ok(comActEasyPhotoVO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 随手拍详情 - 脱敏 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param id | 
|---|
|  |  |  | *            随手拍主键 | 
|---|
|  |  |  | * @param userId | 
|---|
|  |  |  | * @return 详情内容 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public R detailEasyPhotoDesensitize(Long id, Long userId) { | 
|---|
|  |  |  | ComActEasyPhotoVO comActEasyPhotoVO = comActEasyPhotoDAO.detailEasyPhoto(id); | 
|---|
|  |  |  | Integer status = comActEasyPhotoVO.getStatus(); | 
|---|
|  |  |  | if (ObjectUtils.isEmpty(comActEasyPhotoVO) || null == status) { | 
|---|
|  |  |  | return R.fail("随手拍不存在"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!userId.equals(0L)) { | 
|---|
|  |  |  | ComActEasyPhotoUserDO comActEasyPhotoUserDO = | 
|---|
|  |  |  | comActEasyPhotoUserDAO.selectOne(new QueryWrapper<ComActEasyPhotoUserDO>().lambda() | 
|---|
|  |  |  | .eq(ComActEasyPhotoUserDO::getEasyPhotoId, id).eq(ComActEasyPhotoUserDO::getUserId, userId)); | 
|---|
|  |  |  | if (ObjectUtils.isEmpty(comActEasyPhotoUserDO)) { | 
|---|
|  |  |  | comActEasyPhotoVO.setHaveGiveThumbsUp(0); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | comActEasyPhotoVO.setHaveGiveThumbsUp(1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | comActEasyPhotoVO.setSponsorName(DesensitizedUtil.chineseName(comActEasyPhotoVO.getSponsorName())); | 
|---|
|  |  |  | comActEasyPhotoVO.setHandlerName(DesensitizedUtil.chineseName(comActEasyPhotoVO.getHandlerName())); | 
|---|
|  |  |  | comActEasyPhotoVO.setCompleteName(DesensitizedUtil.chineseName(comActEasyPhotoVO.getCompleteName())); | 
|---|
|  |  |  | comActEasyPhotoVO.setPhone(DesensitizedUtil.mobilePhone(comActEasyPhotoVO.getPhone())); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 查询反馈信息 | 
|---|
|  |  |  | List<ComActEasyPhotoFeedbackVO> photoFeedbackList = comActEasyPhotoFeedbackMapper.getPhotoFeedbackList(id); | 
|---|
|  |  |  | if (!photoFeedbackList.isEmpty()) { | 
|---|
|  |  |  | if (CollUtil.isNotEmpty(photoFeedbackList)){ | 
|---|
|  |  |  | for (ComActEasyPhotoFeedbackVO comActEasyPhotoFeedbackVO : photoFeedbackList) { | 
|---|
|  |  |  | comActEasyPhotoFeedbackVO.setCreateByName(DesensitizedUtil.chineseName(comActEasyPhotoFeedbackVO.getCreateByName())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | comActEasyPhotoVO.setPhotoFeedbackList(photoFeedbackList); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (comActEasyPhotoVO.getAddrRemark() == null) { | 
|---|
|  |  |  | comActEasyPhotoVO.setAddrRemark(""); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (comActEasyPhotoVO.getActivityId() != null) { | 
|---|
|  |  |  | ComActEasyPhotoActivityDO photoActivityDO = | 
|---|
|  |  |  | comActEasyPhotoActivityMapper.selectById(comActEasyPhotoVO.getActivityId()); | 
|---|
|  |  |  | if (photoActivityDO != null) { | 
|---|
|  |  |  | ComActEasyPhotoActivityVO easyPhotoActivityVO = new ComActEasyPhotoActivityVO(); | 
|---|
|  |  |  | BeanUtils.copyProperties(photoActivityDO, easyPhotoActivityVO); | 
|---|
|  |  |  | comActEasyPhotoVO.setEasyPhotoActivityVO(easyPhotoActivityVO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | PageComActEasyPhotoEvaluateDto evaluateDto = new PageComActEasyPhotoEvaluateDto(); | 
|---|
|  |  |  | evaluateDto.setServiceId(id); | 
|---|
|  |  |  | evaluateDto.setServiceType(ComActEasyPhotoEvaluate.ServiceType.SSP); | 
|---|
|  |  |  | comActEasyPhotoVO.setEvaluateList(comActEasyPhotoEvaluateMapper.queryAllByList(evaluateDto)); | 
|---|
|  |  |  | return R.ok(comActEasyPhotoVO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | cmActEasyPhotoDO.setTransferTime(nowDate); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | cmActEasyPhotoDO.setIsReportUrban(ComActEasyPhotoVO.isReportUrban.no); | 
|---|
|  |  |  | cmActEasyPhotoDO.setIsReportUrban(ComActEasyPhotoVO.isReportUrban.no ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | cmActEasyPhotoDO.setHandlerId(comActEasyPhotoVO.getHandlerId()); | 
|---|
|  |  |  | cmActEasyPhotoDO.setExamineAt(nowDate); | 
|---|
|  |  |  | cmActEasyPhotoDO.setActivityType(comActEasyPhotoVO.getActivityType()); | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(comActEasyPhotoVO.getHandleResult()) | 
|---|
|  |  |  | 
|---|
|  |  |  | // 审核通过判断随手拍是否有活动并计算用户收益 | 
|---|
|  |  |  | comActUserWalletService.examineAddMoney(comActEasyPhotoVO.getActivityType(), comActEasyPhotoVO.getId(), | 
|---|
|  |  |  | comActEasyPhotoVO.getUserId(), BigDecimal.ZERO); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //添加分配人员 | 
|---|
|  |  |  | if(comActEasyPhotoVO.getHandleList() != null && comActEasyPhotoVO.getHandleList().size() > 0){ | 
|---|
|  |  |  | comActEasyPhotoVO.getHandleList().forEach(handle -> { | 
|---|
|  |  |  | cmActEasyPhotoDO.setHandlerId(handle.getUserId()); | 
|---|
|  |  |  | easyPhotoHandlerService.addHandleRecord(cmActEasyPhotoDO.getCommunityId(),handle.getUserId() | 
|---|
|  |  |  | ,cmActEasyPhotoDO.getId(),handle.getType(), ComActEasyPhotoHandler.ServiceType.SSP,comActEasyPhotoVO.getSponsorId()); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case 2: | 
|---|
|  |  |  | // if(!cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dsh)){ | 
|---|
|  |  |  | 
|---|
|  |  |  | comActEasyPhotoFeedbackMapper.insert(photoFeedbackDO); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case 4: | 
|---|
|  |  |  | if (cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.ywc)) { | 
|---|
|  |  |  | if (cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.ypj)) { | 
|---|
|  |  |  | return R.fail("该随手拍已完成,不可重复操作"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(comActEasyPhotoVO.getHandleResult()) | 
|---|
|  |  |  | 
|---|
|  |  |  | // comActUserWalletService.examineAddMoney(comActEasyPhotoVO.getActivityType(),comActEasyPhotoVO.getId(),comActEasyPhotoVO.getUserId(),BigDecimal.ZERO); | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | cmActEasyPhotoDO.setFeedbackAt(nowDate); | 
|---|
|  |  |  | cmActEasyPhotoDO.setStatus(ComActEasyPhotoDO.status.ywc); | 
|---|
|  |  |  | cmActEasyPhotoDO.setStatus(ComActEasyPhotoDO.status.dpj); | 
|---|
|  |  |  | cmActEasyPhotoDO.setCompleteId(comActEasyPhotoVO.getUserId()); | 
|---|
|  |  |  | if(comActEasyPhotoVO.getUrbanStatus()!=null&&comActEasyPhotoVO.getUrbanStatus()==2){ | 
|---|
|  |  |  | cmActEasyPhotoDO.setUrbanStatus(2); | 
|---|
|  |  |  | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!ObjectUtils.isEmpty(comActEasyPhotoVO.getIsReportDpc())){ | 
|---|
|  |  |  | cmActEasyPhotoDO.setIsReportDpc(comActEasyPhotoVO.getIsReportDpc()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!type.equals(3)) { | 
|---|
|  |  |  | int update = comActEasyPhotoDAO.updateById(cmActEasyPhotoDO); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 小程序分页查询随手拍 脱敏 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param comActEasyPhotoVO | 
|---|
|  |  |  | *            查询参数 | 
|---|
|  |  |  | * @return 返回结果 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public R pageEasyPhotoAppletsDesensitize(ComActEasyPhotoVO comActEasyPhotoVO) { | 
|---|
|  |  |  | Page page = new Page<>(); | 
|---|
|  |  |  | Long pageNum = comActEasyPhotoVO.getPageNum(); | 
|---|
|  |  |  | Long pageSize = comActEasyPhotoVO.getPageSize(); | 
|---|
|  |  |  | Long userId = comActEasyPhotoVO.getLogInUserId(); | 
|---|
|  |  |  | if (null == pageNum || 0 == pageNum) { | 
|---|
|  |  |  | pageNum = 1l; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (null == pageSize || 0 == pageSize) { | 
|---|
|  |  |  | pageSize = 10l; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | page.setSize(pageSize); | 
|---|
|  |  |  | page.setCurrent(pageNum); | 
|---|
|  |  |  | IPage<ComActEasyPhotoVO> iPage = comActEasyPhotoDAO.pageEasyPhotoApplets(page, comActEasyPhotoVO); | 
|---|
|  |  |  | List<ComActEasyPhotoVO> records = iPage.getRecords(); | 
|---|
|  |  |  | if (userId != null) { | 
|---|
|  |  |  | if (!ObjectUtils.isEmpty(records)) { | 
|---|
|  |  |  | records.forEach(comActEasyPhotoVO1 -> { | 
|---|
|  |  |  | Long id = comActEasyPhotoVO1.getId(); | 
|---|
|  |  |  | Integer status = comActEasyPhotoVO1.getStatus(); | 
|---|
|  |  |  | Date feedbackAt = comActEasyPhotoVO1.getFeedbackAt(); | 
|---|
|  |  |  | comActEasyPhotoVO1.setSponsorName(DesensitizedUtil.chineseName(comActEasyPhotoVO1.getSponsorName())); | 
|---|
|  |  |  | comActEasyPhotoVO1.setHandlerName(DesensitizedUtil.chineseName(comActEasyPhotoVO1.getHandlerName())); | 
|---|
|  |  |  | comActEasyPhotoVO1.setCompleteName(DesensitizedUtil.chineseName(comActEasyPhotoVO1.getCompleteName())); | 
|---|
|  |  |  | comActEasyPhotoVO1.setPhone(DesensitizedUtil.mobilePhone(comActEasyPhotoVO1.getPhone())); | 
|---|
|  |  |  | List<ComActEasyPhotoUserDO> comActEasyPhotoUserDO = comActEasyPhotoUserDAO.selectList( | 
|---|
|  |  |  | new QueryWrapper<ComActEasyPhotoUserDO>().lambda().eq(ComActEasyPhotoUserDO::getEasyPhotoId, id) | 
|---|
|  |  |  | .eq(ComActEasyPhotoUserDO::getUserId, userId)); | 
|---|
|  |  |  | if (comActEasyPhotoUserDO == null || comActEasyPhotoUserDO.size() == 0) { | 
|---|
|  |  |  | comActEasyPhotoVO1.setHaveGiveThumbsUp(0); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | comActEasyPhotoVO1.setHaveGiveThumbsUp(1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (status.intValue() == 4 && null == feedbackAt) { | 
|---|
|  |  |  | comActEasyPhotoVO1.setFeedbackAt(comActEasyPhotoVO1.getExamineAt()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //反馈信息列表 | 
|---|
|  |  |  | List<ComActEasyPhotoFeedbackVO> photoFeedbackList = comActEasyPhotoVO1.getPhotoFeedbackList(); | 
|---|
|  |  |  | if (CollUtil.isNotEmpty(photoFeedbackList)){ | 
|---|
|  |  |  | for (ComActEasyPhotoFeedbackVO comActEasyPhotoFeedbackVO : photoFeedbackList) { | 
|---|
|  |  |  | comActEasyPhotoFeedbackVO.setCreateByName(DesensitizedUtil.chineseName(comActEasyPhotoFeedbackVO.getCreateByName())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | comActEasyPhotoVO1.setPhotoFeedbackList(photoFeedbackList); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | iPage.setRecords(records); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(iPage); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 随手拍评论分页查询 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param pageComActEasyPhotoCommentDTO | 
|---|
|  |  |  | 
|---|
|  |  |  | comActEasyPhotoCommentDAO.pageComActEasyPhotoComment(page, pageComActEasyPhotoCommentDTO); | 
|---|
|  |  |  | if (!iPage.getRecords().isEmpty()) { | 
|---|
|  |  |  | for (ComActEasyPhotoCommentVO commentVO : iPage.getRecords()) { | 
|---|
|  |  |  | if (StringUtils.isEmpty(commentVO.getName())) { | 
|---|
|  |  |  | commentVO.setName(commentVO.getNickName()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(iPage); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 随手拍评论分页查询 - 脱敏 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param pageComActEasyPhotoCommentDTO | 
|---|
|  |  |  | *            查询参数 | 
|---|
|  |  |  | * @return 查询结果 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public R pageComActEasyPhotoCommentDesensitize(PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO) { | 
|---|
|  |  |  | Page page = new Page<>(); | 
|---|
|  |  |  | Long pageNum = pageComActEasyPhotoCommentDTO.getPageNum(); | 
|---|
|  |  |  | Long pageSize = pageComActEasyPhotoCommentDTO.getPageSize(); | 
|---|
|  |  |  | if (null == pageNum || 0 == pageNum) { | 
|---|
|  |  |  | pageNum = 1l; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (null == pageSize || 0 == pageSize) { | 
|---|
|  |  |  | pageSize = 10l; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | page.setSize(pageSize); | 
|---|
|  |  |  | page.setCurrent(pageNum); | 
|---|
|  |  |  | IPage<ComActEasyPhotoCommentVO> iPage = | 
|---|
|  |  |  | comActEasyPhotoCommentDAO.pageComActEasyPhotoComment(page, pageComActEasyPhotoCommentDTO); | 
|---|
|  |  |  | if (!iPage.getRecords().isEmpty()) { | 
|---|
|  |  |  | for (ComActEasyPhotoCommentVO commentVO : iPage.getRecords()) { | 
|---|
|  |  |  | commentVO.setNickName(DesensitizedUtil.chineseName(commentVO.getNickName())); | 
|---|
|  |  |  | if (StringUtils.isEmpty(commentVO.getName())) { | 
|---|
|  |  |  | commentVO.setName(commentVO.getNickName()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | SysTemplateConfig sysTemplateConfig=sysTemplateConfigDao.selectOne(new QueryWrapper<SysTemplateConfig>().lambda().eq(SysTemplateConfig::getAreaCode, grantRewardDTO.getAreaCode()).eq(SysTemplateConfig::getType,7)); | 
|---|
|  |  |  | WxXCXTempSend util = new WxXCXTempSend(); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | WxUtil.sendSubscribeJLDZ(openid, util.getAppAccessToken(), "随手拍有奖活动", | 
|---|
|  |  |  | WxUtil.sendSubscribeJLDZ(openid, util.getAccessToken(), "随手拍有奖活动", | 
|---|
|  |  |  | grantRewardDTO.getAmount(), activityType,sysTemplateConfig.getTemplateId()); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("消息推送失败,失败原因:" + e.getMessage()); | 
|---|
|  |  |  | 
|---|
|  |  |  | //查询社区正在进行中的应用预约/登记列表 | 
|---|
|  |  |  | List<ComActReserveIndexVo> comActReserveIndexApplicationVos=comActReserveMapper.indexApplication(communityId); | 
|---|
|  |  |  | if(!comActReserveIndexApplicationVos.isEmpty()){ | 
|---|
|  |  |  | comActReserveIndexApplicationVos.forEach(comActReserveIndexVo -> { | 
|---|
|  |  |  | Integer count=comActReserveRecordMapper.selectCount(new QueryWrapper<ComActReserveRecordDO>().lambda().eq(ComActReserveRecordDO::getReserveId,comActReserveIndexVo.getId()).eq(ComActReserveRecordDO::getUserId,userId)); | 
|---|
|  |  |  | if(count>0){ | 
|---|
|  |  |  | comActReserveIndexVo.setIsCommit(1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else { | 
|---|
|  |  |  | comActReserveIndexVo.setIsCommit(2); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | easyPhotoRewardVO.setComActReserveIndexApplicationVos(comActReserveIndexApplicationVos); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //查询banner | 
|---|
|  |  |  | 
|---|
|  |  |  | return R.ok(this.baseMapper.easyPhotoNoHandleIds(communityId)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取人大代表反馈记录 | 
|---|
|  |  |  | * @param id 随手拍id | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public R getFeedbackList(Long id) { | 
|---|
|  |  |  | return R.ok(comActEasyPhotoFeedbackMapper.getPhotoFeedbackListForDpc(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 人大代表反馈随手拍 | 
|---|
|  |  |  | * @param comActEasyPhotoVO | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public R addEasyPhotoFeedbackForDpc(ComActEasyPhotoVO comActEasyPhotoVO) { | 
|---|
|  |  |  | Date nowDate = new Date(); | 
|---|
|  |  |  | // 操作类型 1审核通过 2驳回 3反馈 4完成随手拍 | 
|---|
|  |  |  | ComActEasyPhotoDO cmActEasyPhotoDO = this.comActEasyPhotoDAO.selectById(comActEasyPhotoVO.getId()); | 
|---|
|  |  |  | if (cmActEasyPhotoDO == null) { | 
|---|
|  |  |  | return R.fail("未查询到随手拍记录"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dfk)) { | 
|---|
|  |  |  | return R.fail("该随手拍不是进行中状态,不可进行反馈"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 给随手拍新增反馈信息 | 
|---|
|  |  |  | ComActEasyPhotoFeedbackDO photoFeedbackDO = new ComActEasyPhotoFeedbackDO(); | 
|---|
|  |  |  | photoFeedbackDO.setEasyId(comActEasyPhotoVO.getId()); | 
|---|
|  |  |  | photoFeedbackDO.setFeedbackContent(comActEasyPhotoVO.getHandleResult()); | 
|---|
|  |  |  | photoFeedbackDO.setFeedbackImg(comActEasyPhotoVO.getHandlePhotoList()); | 
|---|
|  |  |  | photoFeedbackDO.setType(2); | 
|---|
|  |  |  | photoFeedbackDO.setCreateAt(nowDate); | 
|---|
|  |  |  | photoFeedbackDO.setCreateBy(comActEasyPhotoVO.getUserId()); | 
|---|
|  |  |  | int result = comActEasyPhotoFeedbackMapper.insert(photoFeedbackDO); | 
|---|
|  |  |  | if (result > 0) { | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.fail(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取社区置顶动态banner | 
|---|
|  |  |  | * @param communityId | 
|---|
|  |  |  | * */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public R getUserRewardNew(Long userId, Long communityId) { | 
|---|
|  |  |  | ComActEasyPhotoRewardVO easyPhotoRewardVO=new ComActEasyPhotoRewardVO(); | 
|---|
|  |  |  | List<BannerVO> bannerVOS=this.comActEasyPhotoDAO.getBanner(communityId); | 
|---|
|  |  |  | if(!bannerVOS.isEmpty()){ | 
|---|
|  |  |  | easyPhotoRewardVO.setBannerVOS(bannerVOS); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(easyPhotoRewardVO); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|