|
@@ -115,6 +115,20 @@ public class RegisterController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @PutMapping("/put")
|
|
|
|
|
+ public Result<String> update(@RequestBody RegisterOrderDon req){
|
|
|
|
|
+ if (req.getId() == null) {
|
|
|
|
|
+ throw new BusinessRuntimeException("缺少必填参数");
|
|
|
|
|
+ }
|
|
|
|
|
+ RegisterOrderDon registerOrderDon = registerOrderDonService.getById(req.getId());
|
|
|
|
|
+ if (!registerOrderDon.getStatus().equals(RegisterOrderDon.Status.error)) {
|
|
|
|
|
+ throw new BusinessRuntimeException("该状态下不可更改信息");
|
|
|
|
|
+ }
|
|
|
|
|
+ registerOrderDonService.updateById(req);
|
|
|
|
|
+
|
|
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|