| | |
| | | * @param comActEasyPhotoAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | @Override |
| | | public R add(ComActEasyPhotoAddDTO comActEasyPhotoAddDTO) { |
| | | ComActEasyPhotoDO comActEasyPhotoDO = new ComActEasyPhotoDO(); |
| | | BeanUtils.copyProperties(comActEasyPhotoAddDTO, comActEasyPhotoDO); |
| | |
| | | * @param comActEasyPhotoEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @Override |
| | | public R edit(ComActEasyPhotoEditDTO comActEasyPhotoEditDTO) { |
| | | ComActEasyPhotoDO comActEasyPhotoDO = new ComActEasyPhotoDO(); |
| | | BeanUtils.copyProperties(comActEasyPhotoEditDTO, comActEasyPhotoDO); |
| | |
| | | * @param easyAppDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @Override |
| | | public R<IPage<ComActEasyPhotoVO>> query(PageEasyAppDTO easyAppDTO) { |
| | | Page page = new Page(easyAppDTO.getPageNum(), easyAppDTO.getPageSize()); |
| | | if (easyAppDTO.getStatus() != null) { |
| | |
| | | easyAppDTO.setIsPublicity(1); |
| | | break; |
| | | case 4: |
| | | easyAppDTO.setIsPublicity(0); |
| | | easyAppDTO.setIsPublicity(2); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | * @param ComActEasyPhotoDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | @Override |
| | | public R delete(ComActEasyPhotoDeleteDTO ComActEasyPhotoDeleteDTO) { |
| | | return R.fail(); |
| | | } |
| | |
| | | * 社区活动 》随手拍 id |
| | | * @return 查找结果 |
| | | */ |
| | | @Override |
| | | public R<ComActEasyPhotoDetailsVO> comActEasyPhotoDetails(Long id) { |
| | | ComActEasyPhotoDO comActEasyPhotoDO = comActEasyPhotoMapper.selectById(id); |
| | | if (comActEasyPhotoDO != null) { |
| | |
| | | easyPhotoDO.setHandleStatus(ComActEasyPhotoDO.handleStatus.yes); |
| | | easyPhotoDO.setFeedbackAt(new Date()); |
| | | // 关联随手拍类型 |
| | | if (!photoHandleDTO.getEasyTypeIds().isEmpty()) { |
| | | List<ComActEasyPhotoTypeRelationDO> typeRelationDOList = new ArrayList<>(); |
| | | photoHandleDTO.getEasyTypeIds().forEach(typeId -> { |
| | | ComActEasyPhotoTypeRelationDO typeRelationDO = new ComActEasyPhotoTypeRelationDO(); |
| | | typeRelationDO.setEasyId(easyPhotoDO.getId()); |
| | | typeRelationDO.setEasyTypeId(typeId); |
| | | typeRelationDO.setCreateAt(new Date()); |
| | | typeRelationDOList.add(typeRelationDO); |
| | | }); |
| | | comActEasyPhotoTypeRelationService.saveBatch(typeRelationDOList); |
| | | } |
| | | // if (!photoHandleDTO.getEasyTypeIds().isEmpty()) { |
| | | // List<ComActEasyPhotoTypeRelationDO> typeRelationDOList = new ArrayList<>(); |
| | | // photoHandleDTO.getEasyTypeIds().forEach(typeId -> { |
| | | // ComActEasyPhotoTypeRelationDO typeRelationDO = new ComActEasyPhotoTypeRelationDO(); |
| | | // typeRelationDO.setEasyId(easyPhotoDO.getId()); |
| | | // typeRelationDO.setEasyTypeId(typeId); |
| | | // typeRelationDO.setCreateAt(new Date()); |
| | | // typeRelationDOList.add(typeRelationDO); |
| | | // }); |
| | | // comActEasyPhotoTypeRelationService.saveBatch(typeRelationDOList); |
| | | // } |
| | | if (this.baseMapper.updateById(easyPhotoDO) > 0) { |
| | | return R.ok(); |
| | | } else { |
| | |
| | | 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); |
| | | if(photoAdmin.getClassifyId() != null){ |
| | | List<String> photoTypeList = |
| | | comActEasyPhotoTypeRelationMapper.getEasyPhotoClassifyName(photoAdmin.getClassifyId()); |
| | | if (!photoTypeList.isEmpty()) { |
| | | photoAdmin.setPhotoTypeList(photoTypeList); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | } |
| | | BeanUtils.copyProperties(photoHandleDTO, easyPhotoDO); |
| | | easyPhotoDO.setHandleStatus(ComActEasyPhotoDO.handleStatus.yes); |
| | | easyPhotoDO.setFeedbackAt(new Date()); |
| | | // 关联随手拍类型 |
| | | if (!photoHandleDTO.getEasyTypeIds().isEmpty()) { |
| | | List<ComActEasyPhotoTypeRelationDO> typeRelationDOList = new ArrayList<>(); |