From daa042c75ea717edee57536c135d754b1844e62d Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Tue, 13 Apr 2021 11:56:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E9=A2=9D=E5=BA=A6=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guarantee/controller/DgApplyAmountInfoController.java | 5 +++-- .../guarantee/model/request/BusinessApplicationRequest.java | 2 ++ .../com/daqing/financial/guarantee/util/TaskNodeUtil.java | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index 4449a92a..16082a66 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -37,6 +37,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.io.*; import java.util.*; @@ -99,7 +100,7 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA @Log(detail = "业务申请",level = 3,operationUnit = OperationUnit.APPLYAMOUNTINFO,operationType = OperationType.INSERT) @PostMapping("/businessApplication") @ApiOperation(value = "业务申请") - public ResponseResult businessApplication(@RequestBody BusinessApplicationRequest businessApplication){ + public ResponseResult businessApplication(@RequestBody @Valid BusinessApplicationRequest businessApplication){ int result = applyAmountInfoService.businessApplication(businessApplication); return result>0 ? ResponseResult.SUCCESS("上传成功"):ResponseResult.FAIL(40004,"上传失败"); } @@ -275,7 +276,7 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA @Log(detail = "修改业务申请",level = 4,operationUnit = OperationUnit.APPLYAMOUNTINFO,operationType = OperationType.UPDATE) @PostMapping("/updateBusinessApplication") @ApiOperation(value = "根据业务id修改业务申请内容") - public ResponseResult updateBusinessApplication(@RequestBody BusinessApplicationRequest businessApplication){ + public ResponseResult updateBusinessApplication(@RequestBody @Valid BusinessApplicationRequest businessApplication){ int result = applyAmountInfoService.updateBusinessApplication(businessApplication); return result>0 ? ResponseResult.SUCCESS("修改成功!"):ResponseResult.FAIL(40005,"修改失败!"); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java index 37f4af09..842aa85a 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; +import javax.validation.constraints.Pattern; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; @@ -43,6 +44,7 @@ public class BusinessApplicationRequest implements Serializable { /** * 申请额度 */ + @Pattern(regexp = "^(([1-9]{1}\\d*)|(0{1}))(\\.\\d{1,2})?$", message = "申请额度格式错误!") @ApiModelProperty(value = "申请额度") private BigDecimal applyAmount; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/TaskNodeUtil.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/TaskNodeUtil.java index 130eb60e..73673f14 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/TaskNodeUtil.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/util/TaskNodeUtil.java @@ -26,7 +26,7 @@ public class TaskNodeUtil { case "8": return "担保函"; case "9": - return "回款确认"; + return "财务确认"; case "10": return "放款通知"; default: