CeDo
2021-06-05 0f5140fe147ebc1179de0b4f5a692e4a66ff54f2
bugfixed
4个文件已修改
25 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventReportDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/CommonEventApi.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/SpecialPopulationEventApi.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventReportDTO.java
@@ -41,5 +41,8 @@
    @ApiModelProperty(value = "(当前操作)用户姓名", hidden = true, example = "张三")
    private String userName;
    @ApiModelProperty(value = "(当前操作)用户社区ID", hidden = true, example = "1")
    private Long communityId;
}
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/CommonEventApi.java
@@ -111,6 +111,7 @@
        ClazzUtils.setIfStringIsEmpty(commonEventReportDTO);
        commonEventReportDTO.setUserId(loginUserInfoVO.getUserId());
        commonEventReportDTO.setUserName(loginUserInfoVO.getName());
        commonEventReportDTO.setCommunityId(loginUserInfoVO.getCommunityId());
        return gridService.report(commonEventReportDTO);
    }
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/SpecialPopulationEventApi.java
@@ -92,6 +92,7 @@
        ClazzUtils.setIfStringIsEmpty(commonEventReportDTO);
        commonEventReportDTO.setUserId(loginUserInfoVO.getUserId());
        commonEventReportDTO.setUserName(loginUserInfoVO.getName());
        commonEventReportDTO.setCommunityId(loginUserInfoVO.getCommunityId());
        return gridService.report(commonEventReportDTO);
    }
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -469,6 +469,26 @@
            return R.fail("当前事件已交由社区处理");
        }
        List<EventTransferRecordDO> list = eventTransferRecordService.getBaseMapper().selectList(new LambdaQueryWrapper<EventTransferRecordDO>()
                .eq(EventTransferRecordDO::getEventId, eventDO.getId())
                .orderByDesc(EventTransferRecordDO::getCreateAt)
        );
        Long reportToInDB = -1L;
        for (int i = 0; i < list.size(); i++) {
            EventTransferRecordDO eventTransferRecordDO = list.get(i);
            if(eventTransferRecordDO.getProcessType()!=null && eventTransferRecordDO.getProcessType()==2){
                reportToInDB = eventTransferRecordDO.getToId();
            }
        }
        if(commonEventReportDTO.getCommunityId()==null){
            return R.fail("当前用户社区获取失败");
        }
        if(reportToInDB.longValue() != commonEventReportDTO.getCommunityId().longValue()){
            return R.fail("用户上报的社区不是当前社区");
        }
        R r  = communityService.detailCommunity(commonEventReportDTO.getToId());
        if(!R.isOk(r)){
            return R.fail("社区不存在");