From a51d370e1d709fcc4b75e2af2fc18fbaed08f31d Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期五, 30 四月 2021 15:55:28 +0800 Subject: [PATCH] 名字为null问题修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java index 9b59baa..afae443 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java @@ -12,6 +12,7 @@ import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; import com.panzhihua.common.model.vos.community.TodoEventsVO; import com.panzhihua.common.utlis.SensitiveUtil; +import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.service_community.dao.ComActEasyPhotoCommentDAO; import com.panzhihua.service_community.dao.ComActEasyPhotoCommentUserDAO; import com.panzhihua.service_community.dao.ComActEasyPhotoDAO; @@ -292,6 +293,13 @@ page.setSize(pageSize); page.setCurrent(pageNum); IPage<ComActEasyPhotoCommentVO> iPage = comActEasyPhotoCommentDAO.pageComActEasyPhotoComment(page, pageComActEasyPhotoCommentDTO); + if(!iPage.getRecords().isEmpty()){ + for (ComActEasyPhotoCommentVO commentVO:iPage.getRecords()) { + if(StringUtils.isNotEmpty(commentVO.getName())){ + commentVO.setName(commentVO.getNickName()); + } + } + } return R.ok(iPage); } -- Gitblit v1.7.1