张天森
2022-11-18 6c41c1be2ef19a928a439001aa60d55557912722
三说会堂大屏统计处理
6个文件已修改
18 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMediateTypeDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/CommediateTypeService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/CommediateTypeServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMediaTypeMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java
@@ -8,6 +8,7 @@
import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoEventDTO;
import com.panzhihua.common.model.dtos.community.sanshuo.IndexDateDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.service_community.entity.ComEvent;
import com.panzhihua.service_community.entity.ComMediateType;
import com.panzhihua.service_community.entity.ComSanshuoEvent;
@@ -38,11 +39,15 @@
    @Resource
    private IComEventService comEventService;
    @Resource
    private UserService userService;
    @GetMapping ("/list")
    public R list(@RequestParam(value = "keyWord",required = false)String keyWord,
                  @RequestParam(value = "page",required = false)Integer page,
                  @RequestParam(value = "size",required = false)Integer size){
        return commediateTypeService.listEvent(keyWord,page,size);
        String appId=userService.detailUser(this.getUserId()).getData().getAppId();
        return commediateTypeService.listEvent(keyWord,page,size,appId);
    }
    @GetMapping("/detail")
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMediateTypeDao.java
@@ -28,7 +28,7 @@
    /**
     * 查询该事件类型的事件数量
     * */
    Integer selectEventCount(Long id);
    Integer selectEventCount(@Param("id") Long id,@Param("appId")String appId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/CommediateTypeService.java
@@ -14,7 +14,7 @@
     * @param size
     * @return 处理结果
     * */
    R listEvent(String keyWord, Integer page, Integer size);
    R listEvent(String keyWord, Integer page, Integer size,String appId);
    /**
     * 新增或修改事件类型
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/CommediateTypeServiceImpl.java
@@ -40,13 +40,13 @@
     * @return 处理结果
     * */
    @Override
    public R listEvent(String keyWord, Integer page, Integer size) {
    public R listEvent(String keyWord, Integer page, Integer size,String appId) {
        IPage<ComMediateType> comMediateTypeIPage = comMediateTypeDao.eventList(new Page(page, size), keyWord);
        List<ComMediateType> records = comMediateTypeIPage.getRecords();
        for (ComMediateType record : records) {
            //查询事件数量
            if (nonNull(record) && nonNull(record.getId())){
                record.setEventCount(comMediateTypeDao.selectEventCount(record.getId()));
                record.setEventCount(comMediateTypeDao.selectEventCount(record.getId(),appId));
            }
        }
        comMediateTypeIPage.setRecords(records);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml
@@ -274,6 +274,8 @@
        (SELECT count(id) FROM com_sanshuo_event_info
        where is_end &lt;> 1
        AND user_event_status not in(3,4)
        AND event_process_status > 1
        AND event_process_status not in (9)
        AND app_id='wx0cef797390444b75'
        <if test="dto.type == 2">
            AND current_process_type in (1,5)
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMediaTypeMapper.xml
@@ -11,5 +11,6 @@
    <select id="selectEventCount" resultType="java.lang.Integer">
        select count(id) from com_sanshuo_event_info
        where event_category = #{id}
        AND app_id=#{appId}
    </select>
</mapper>