| | |
| | | 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); |
| | |
| | | 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") |
| | |
| | | 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 { |
| | |
| | | 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); |