From ffcd3e31c9938eb256d616c80edbe1821e9fb2bf Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期五, 02 七月 2021 16:15:34 +0800 Subject: [PATCH] 综治后台小区模块接口 --- springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/ComActEasyPhotoServiceImpl.java | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/ComActEasyPhotoServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/ComActEasyPhotoServiceImpl.java index fc1459b..3d38f3a 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/ComActEasyPhotoServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/ComActEasyPhotoServiceImpl.java @@ -153,8 +153,12 @@ if(easyPhotoDO.getHandleStatus().equals(ComActEasyPhotoDO.handleStatus.yes)){ return R.fail("该随手拍已处理"); } + if(easyPhotoDO.getIsReport().equals(ComActEasyPhotoDO.isReport.no)){ + return R.fail("该随手拍未上报社区"); + } BeanUtils.copyProperties(photoHandleDTO,easyPhotoDO); easyPhotoDO.setHandleStatus(ComActEasyPhotoDO.handleStatus.yes); + easyPhotoDO.setFeedbackAt(new Date()); //关联随手拍类型 if(!photoHandleDTO.getEasyTypeIds().isEmpty()){ List<ComActEasyPhotoTypeRelationDO> typeRelationDOList = new ArrayList<>(); @@ -223,7 +227,17 @@ */ @Override public R easyListByAdmin(PageEasyAdminDTO easyAppDTO){ - return R.ok(this.baseMapper.easyListByAdmin(new Page(easyAppDTO.getPageNum(),easyAppDTO.getPageSize()), easyAppDTO)); + IPage<ComActEasyPhotoAdminVO> photoAdminVOIPage = this.baseMapper.easyListByAdmin(new Page(easyAppDTO.getPageNum(),easyAppDTO.getPageSize()), easyAppDTO); + if(!photoAdminVOIPage.getRecords().isEmpty()){ + photoAdminVOIPage.getRecords().forEach(photoAdmin -> { + //随手拍已处理,查询随手拍类型 + List<String> photoTypeList = comActEasyPhotoTypeRelationMapper.getEasyPhotoTypeRelationByEasyId(photoAdmin.getId()); + if(!photoTypeList.isEmpty()){ + photoAdmin.setPhotoTypeList(photoTypeList); + } + }); + } + return R.ok(photoAdminVOIPage); } /** @@ -293,6 +307,15 @@ */ @Override public R easyPublicityByAdmin(ComActEasyPhotoEditAdminDTO photoEditDTO){ + + if(photoEditDTO.getType().equals(1)){ + Integer count = this.baseMapper.selectCount(new QueryWrapper<ComActEasyPhotoDO>().lambda() + .eq(ComActEasyPhotoDO::getHandleStatus,ComActEasyPhotoDO.handleStatus.no).in(ComActEasyPhotoDO::getId,photoEditDTO.getIds())); + if(count > 0){ + return R.fail("您选择的有未处理的随手拍,不可进行操作"); + } + } + if(this.baseMapper.easyPublicityByAdmin(photoEditDTO) > 0){ return R.ok(); }else{ -- Gitblit v1.7.1