| | |
| | | if (item.getUserId() != null) { |
| | | Report report = reportService.getOne(new QueryWrapper<Report>().eq("id", item.getUserId())); |
| | | User user = userService.getOne(new QueryWrapper<User>().eq("id", report.getUserId())); |
| | | if (Objects.isNull(user)) { |
| | | return; |
| | | } |
| | | messageMap.put("id", user.getId()); |
| | | messageMap.put("name", item.getReportName()); |
| | | messageMap.put("mobile", user.getUserMobile()); |
| | |
| | | } else { |
| | | messageMap.put("id", item.getCopId()); |
| | | User user = userService.getOne(new QueryWrapper<User>().eq("id", item.getCopId())); |
| | | if (Objects.isNull(user)) { |
| | | return; |
| | | } |
| | | messageMap.put("name", user.getRealName()); |
| | | messageMap.put("mobile", user.getUserMobile()); |
| | | messageMap.put("sex", user.getSex()); |
| | |
| | | ReportVo reportVo = new ReportVo(); |
| | | BeanUtils.copyProperties(item, reportVo); |
| | | User user = userDao.selectOne(new LambdaQueryWrapper<User>().eq(User::getId, item.getUserId())); |
| | | Cause one = causeService.getOne(new LambdaQueryWrapper<Cause>().eq(Cause::getId, item.getCauseId())); |
| | | reportVo.setReportDescription(one.getName()); |
| | | reportVo.setReporterName(user.getRealName()); |
| | | reportVo.setMobile(user.getUserMobile()); |
| | | reportVo.setIdcard(user.getUserIdcard()); |