修复完所有问题

hyx_2024-10-12_xgfPerson
shanao 2024-09-12 14:46:20 +08:00
parent 2b383e1364
commit 69a359ded8
1 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,8 @@ public class AccidentRecordsController extends BaseController {
@ResponseBody @ResponseBody
@RequestMapping("/update") @RequestMapping("/update")
public Map<String, Object> update(HttpServletRequest request) { public Map<String, Object> update(HttpServletRequest request) {
AccidentRecords accidentRecords = BeanUtil.mapToBean(new PageData(request), AccidentRecords.class, true); PageData pageData = new PageData(request);
AccidentRecords accidentRecords = BeanUtil.mapToBean(pageData, AccidentRecords.class, true);
accidentRecords.setId(Optional.of(accidentRecords.getId()).orElseThrow(() -> new RuntimeException("id不能为空"))); accidentRecords.setId(Optional.of(accidentRecords.getId()).orElseThrow(() -> new RuntimeException("id不能为空")));
accidentRecordsService.update(accidentRecords); accidentRecordsService.update(accidentRecords);
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();