From 8dd1b0fb109fc828996f298f0f21095cdd75b0c8 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期二, 19 十月 2021 14:05:28 +0800 Subject: [PATCH] bug修复 --- springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/ComActEasyPhotoServiceImpl.java | 33 +++++++++++++++++---------------- 1 files changed, 17 insertions(+), 16 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 a43eea6..2fe38fa 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 @@ -174,17 +174,17 @@ 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 { @@ -251,11 +251,12 @@ 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.getId()); + if (!photoTypeList.isEmpty()) { + photoAdmin.setPhotoTypeList(photoTypeList); + } } }); } -- Gitblit v1.7.1