|  |  |  | 
|---|
|  |  |  | import javax.annotation.Resource; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | private ComActEasyPhotoHandlerService easyPhotoHandlerService; | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private ComActEasyPhotoEvaluateMapper comActEasyPhotoEvaluateMapper; | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private ComActReserveRecordMapper comActReserveRecordMapper; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 分页查询随手拍 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | 
|---|
|  |  |  | 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(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|