huanghongfa
2021-04-30 a51d370e1d709fcc4b75e2af2fc18fbaed08f31d
名字为null问题修改
6个文件已修改
21 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ActivitySignVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoCommentVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoCommentDAO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ActivitySignVO.java
@@ -20,6 +20,8 @@
    private Long id;
    @ApiModelProperty("名字")
    private String name;
    @ApiModelProperty("用户昵称")
    private String nickName;
    @ApiModelProperty("身份")
    private String identity;
    @ApiModelProperty("手机号")
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoCommentVO.java
@@ -35,6 +35,9 @@
    @ApiModelProperty("评论人名字")
    private String name;
    @ApiModelProperty("评论人昵称")
    private String nickName;
    @ApiModelProperty("评论人头像")
    private String url;
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -22,6 +22,7 @@
import org.springframework.beans.BeanUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -257,6 +258,11 @@
        if (R.isOk(r)) {
            List<ActivitySignVO> activitySignVOS = JSONArray.parseArray(JSONArray.toJSONString( r.getData()),ActivitySignVO.class);
            if (!ObjectUtils.isEmpty(activitySignVOS)) {
                for (ActivitySignVO signVO:activitySignVOS) {
                    if(!StringUtils.isEmpty(signVO.getName())){
                        signVO.setName(signVO.getNickName());
                    }
                }
                List<ActivitySignVO> collect = activitySignVOS.stream().filter(activitySignVO1 -> activitySignVO1.getIsVolunteer() == 1).collect(Collectors.toList());
                if (!ObjectUtils.isEmpty(collect)) {
                    int size = collect.size();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java
@@ -22,6 +22,7 @@
            "u.user_id id,\n" +
            "u.image_url,\n" +
            "u.name,\n" +
            "u.nick_name,\n" +
            "case WHEN u.is_partymember = 1 THEN '党员' WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity,\n" +
            "u.phone,\n" +
            "a.create_at, \n" +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoCommentDAO.java
@@ -34,6 +34,7 @@
            "m.id,\n" +
            "m.`comment`,\n" +
            "e.`name`,\n" +
            "e.`nick_name`,\n" +
            "e.image_url url,\n" +
            "m.create_at,\n" +
            "if(u1.id is null,0,1)haveSign,\n" +
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);
    }