From 34585765970418096cd642d85950b43382a58327 Mon Sep 17 00:00:00 2001
From: baizonghao <1719256278@qq.com>
Date: 星期三, 22 三月 2023 11:25:15 +0800
Subject: [PATCH] 1111
---
src/main/java/com/example/jz/controller/WxAppController.java | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/example/jz/controller/WxAppController.java b/src/main/java/com/example/jz/controller/WxAppController.java
index 207acea..1a8fae5 100644
--- a/src/main/java/com/example/jz/controller/WxAppController.java
+++ b/src/main/java/com/example/jz/controller/WxAppController.java
@@ -246,10 +246,11 @@
public R addReport(@RequestBody ReportVXVO reportVXVO) {
User user = userService.getOne(new QueryWrapper<User>().eq("id", reportVXVO.getUserId()));
user.setRealName(reportVXVO.getRealName());
+ user.setSex(reportVXVO.getSex());
user.setUserIdcard(reportVXVO.getUserIdCard());
user.setLocation(reportVXVO.getLocation());
- user.setSex(reportVXVO.getSex());
user.setWorkingLocation(reportVXVO.getWorkingLocation());
+
userService.update(user, new LambdaQueryWrapper<User>().eq(User::getId, user.getId()));
Report report = new Report();
BeanUtils.copyProperties(reportVXVO, report);
@@ -260,6 +261,29 @@
report.setStatus(0);
report.setReportMethod("鎵爜鎶ユ");
return R.ok(reportService.save(report));
+ }
+
+ @PutMapping ("/user/addReport")
+ public R addReport1(@RequestBody ReportVXVO reportVXVO) {
+ User user = userService.getOne(new QueryWrapper<User>().eq("id", reportVXVO.getUserId()));
+ user.setRealName(reportVXVO.getRealName());
+ user.setSex(reportVXVO.getSex());
+ user.setUserIdcard(reportVXVO.getUserIdCard());
+ user.setLocation(reportVXVO.getLocation());
+ user.setWorkingLocation(reportVXVO.getWorkingLocation());
+
+ userService.update(user, new LambdaQueryWrapper<User>().eq(User::getId, user.getId()));
+ Report report = new Report();
+ BeanUtils.copyProperties(reportVXVO, report);
+ report.setAmountInvolved(reportVXVO.getAmountInvolved());
+ report.setPic(user.getPic());
+ report.setIsInGroup(0);
+ report.setCtime(new Date());
+ report.setStatus(0);
+ report.setReportMethod("鎵爜鎶ユ");
+
+ reportService.update(report, new LambdaQueryWrapper<Report>().eq(Report::getId, report.getId()));
+ return R.ok("淇敼鎴愬姛");
}
@PostMapping("/user/add")
@@ -366,6 +390,7 @@
messageMap.put("name", item.getReportName());
messageMap.put("mobile", user.getUserMobile());
messageMap.put("idcard", user.getUserIdcard());
+ messageMap.put("sex", user.getSex());
messageMap.put("pic", user.getPic());
messageMap.put("role", 0);
} else {
@@ -373,6 +398,7 @@
User user = userService.getOne(new QueryWrapper<User>().eq("id", item.getCopId()));
messageMap.put("name", user.getRealName());
messageMap.put("mobile", user.getUserMobile());
+ messageMap.put("sex", user.getSex());
messageMap.put("role", 1);
}
message.add(messageMap);
--
Gitblit v1.8.0