xyh
2021-06-18 6ce74eb97e73d5cfd327e0b7042b7c7999d83ea5
bug-[409]-【后端-宣传教育 -查看详情】 创建人不正确
4个文件已修改
30 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventDetailsVO.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventDetailsVO.java
@@ -164,9 +164,12 @@
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date submitDate;
    @ApiModelProperty(value = "创建人")
    @ApiModelProperty(value = "创建人id")
    private Long createBy;
    @ApiModelProperty(value = "创建人姓名")
    private String creator;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMapper.java
@@ -11,6 +11,7 @@
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
 * DAO
@@ -90,4 +91,11 @@
     * @return  网格事件统计数据
     */
    GridEventStatisticsDetailVO getGridEventDetailStatisticsByApp(@Param("statisticsDTO") GridEventStatisticsDTO statisticsDTO);
    /**
     * 查询时间发布者基本信息
     * @param gridMemberId
     * @return
     */
    Map<String, Object> getUserBaseInfo(@Param("gridMemberId")Long gridMemberId);
}
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -17,7 +17,6 @@
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.service_grid.dao.*;
import com.panzhihua.service_grid.model.dos.*;
import com.panzhihua.service_grid.service.EventGridDataService;
import com.panzhihua.service_grid.service.EventResourceService;
import com.panzhihua.service_grid.service.EventService;
import com.panzhihua.service_grid.service.EventTransferRecordService;
@@ -25,12 +24,14 @@
import org.springframework.stereotype.Service;
import org.springframework.beans.BeanUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * @author cedoo
@@ -53,8 +54,6 @@
    private EventGridDataMapper eventGridDataMapper;
    @Resource
    private EventGridMemberRelationMapper eventGridMemberRelationMapper;
    @Resource
    private EventGridDataService eventGridDataService;
    /**
     * 分页查找事件
@@ -234,10 +233,11 @@
            }
            eventDetailsVO.setTrans(eventTransferRecordVOS);
            //查询事件发布人头像
            String imageUrl = eventMapper.getGridMemberImageUrl(eventDO.getGridMemberId());
            if (StringUtils.isNotEmpty(imageUrl)) {
                eventDetailsVO.setGridMemberImageUrl(imageUrl);
            //查询网格员头像,姓名
            Map<String,Object> userBaseInfoMap = eventMapper.getUserBaseInfo(eventDO.getGridMemberId());
            if (!CollectionUtils.isEmpty(userBaseInfoMap)) {
                eventDetailsVO.setCreator(userBaseInfoMap.get("name") == null ? "" : userBaseInfoMap.get("name").toString());
                eventDetailsVO.setGridMemberImageUrl(userBaseInfoMap.get("image_url") == null ? "" : userBaseInfoMap.get("image_url").toString());
            }
            return R.ok(eventDetailsVO);
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
@@ -876,4 +876,7 @@
            </if>
    </select>
    <select id="getUserBaseInfo" parameterType="java.lang.Long" resultType="java.util.Map">
        select name,image_url from sys_user where user_id = #{gridMemberId}
    </select>
</mapper>