src/main/java/com/example/jz/controller/WxAppController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/example/jz/modle/entity/Cause.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/example/jz/modle/vo/ReportListVo.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/ReportDao.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/example/jz/controller/WxAppController.java
@@ -386,6 +386,9 @@ 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()); @@ -396,6 +399,9 @@ } 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()); @@ -578,6 +584,8 @@ 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()); src/main/java/com/example/jz/modle/entity/Cause.java
@@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; import lombok.Data; import java.io.Serializable; import java.util.Date; src/main/java/com/example/jz/modle/vo/ReportListVo.java
@@ -24,4 +24,6 @@ //报案人身份证号 private String idcard; private String sex; } src/main/resources/mapper/ReportDao.xml
@@ -30,7 +30,7 @@ order by r.ctime DESC </select> <select id="getReportListVoById" resultType="com.example.jz.modle.vo.ReportListVo"> select u.user_mobile mobile, u.user_idcard idcard, u.real_name reporterName, r.* select u.user_mobile mobile, u.user_idcard idcard, u.real_name reporterName, u.sex sex,r.* from report r join user u on r.user_id = u.id where r.id = #{id}