Преглед изворни кода

1.支付码根据协议的状态置为失效。

wks пре 1 година
родитељ
комит
382667267b

+ 3 - 3
src/main/java/com/ydtech/modules/protocol/constants/ValidStatus.java

@@ -14,10 +14,10 @@ import lombok.Getter;
 @Getter
 @Getter
 public enum ValidStatus {
 public enum ValidStatus {
 
 
-    AVS_0("0", "禁用"),
-    AVS_1("1", "启用");
+    AVS_0(0, "禁用"),
+    AVS_1(1, "启用");
 
 
-    private final String code;
+    private final Integer code;
 
 
     private final String description;
     private final String description;
 
 

+ 1 - 1
src/main/java/com/ydtech/modules/protocols/entity/po/PtlAgreementProductCostsNew.java

@@ -139,7 +139,7 @@ public class PtlAgreementProductCostsNew {
      */
      */
     @ApiModelProperty(value = "费用状态")
     @ApiModelProperty(value = "费用状态")
     @TableField(value = "valid_status")
     @TableField(value = "valid_status")
-    private String validStatus;
+    private Integer validStatus;
 
 
     @ApiModelProperty(value = "驳回信息")
     @ApiModelProperty(value = "驳回信息")
     @TableField(value = "reject")
     @TableField(value = "reject")

+ 4 - 1
src/main/java/com/ydtech/modules/protocols/service/impl/PtlAgreementProductCostsNewServiceImpl.java

@@ -2453,7 +2453,10 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
     public HttpResult costsDisable(String costsId) {
     public HttpResult costsDisable(String costsId) {
         PtlAgreementProductCostsNew ptlAgreementProductCostsNew = getById(costsId);
         PtlAgreementProductCostsNew ptlAgreementProductCostsNew = getById(costsId);
         AssertionUtils.isEmpty(ptlAgreementProductCostsNew, "未查询到此协议");
         AssertionUtils.isEmpty(ptlAgreementProductCostsNew, "未查询到此协议");
-
+        if (ValidStatus.AVS_0.getCode().equals(ptlAgreementProductCostsNew.getValidStatus())) {
+            ptlAgreementProductCostsNew.setValidStatus(ValidStatus.AVS_1.getCode());
+            return HttpResult.ok("修改成功");
+        }
         // 查询费用列表
         // 查询费用列表
         List<InsFeeOrderNew> insFeeOrderNews = insFeeOrderNewService
         List<InsFeeOrderNew> insFeeOrderNews = insFeeOrderNewService
                 .lambdaQuery()
                 .lambdaQuery()