diff --git a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/EntPayService.java b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/EntPayService.java index 0020da7..9b3c874 100644 --- a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/EntPayService.java +++ b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/EntPayService.java @@ -61,10 +61,10 @@ public class EntPayService { /** * 300311-协议支付 */ - public EntPayAgrtPayResponse agrtPay(EntPayAgrtPayRequest request) { - String url = "/entpay/agrt-pay"; - HttpResponse httpResponse = apiClient.post(url, HttpHeaders.apiVersionV2(), - request.toJsonRequest(), EntPayAgrtPayResponse.class); + public EntPayAgrtWithholdResponse agrtWithhold(EntPayAgrtWithholdRequest request) { + String url = "/entpay/agrt-withhold"; + HttpResponse httpResponse = apiClient.post(url, HttpHeaders.apiVersionV2(), + request.toJsonRequest(), EntPayAgrtWithholdResponse.class); return httpResponse.getServiceResponse(); } } diff --git a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtPayRequest.java b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtPayRequest.java deleted file mode 100644 index 917173c..0000000 --- a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtPayRequest.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.czcb.scfs.api.service.v2.customization.miyang.entpay.model; - -import com.czcb.scfs.api.core.ApiRequest; -import com.czcb.scfs.api.core.agrs.TransType; -import com.google.gson.annotations.SerializedName; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.math.BigDecimal; - -/** - * 300311-协议支付 - * - * @author H.T - * @since 2024-07-29 - */ -@Data -@Accessors(chain = true) -@TransType("300311") -public class EntPayAgrtPayRequest implements ApiRequest { - /** - * 渠道编号 - */ - @SerializedName("channel_no") - private String channelNo; - - /** - * 应用编号 - */ - @SerializedName("app_no") - private String appNo; - - /** - * 流水号 - */ - @SerializedName("serial_no") - private String serialNo; - - /** - * 操作日期 yyyy-MM-dd - */ - @SerializedName("trans_date") - private String transDate; - - /** - * 操作时间 yyyy-MM-dd HH:mm:ss - */ - @SerializedName("trans_tradetime") - private String transTradeTime; - - /** - * 付款账户账号A1 - */ - @SerializedName("account_no_a1") - private String accountNoA1; - - /** - * 付款账户户名A1 - */ - @SerializedName("account_name_a1") - private String accountNameA1; - - /** - * 支付金额1 大于等于0 不从A1支付则填0 - */ - @SerializedName("pay_amount_a1") - private BigDecimal payAmountA1; - - /** - * 付款账户账号A2 - */ - @SerializedName("account_no_a2") - private String accountNoA2; - - /** - * 付款账户户名A2 - */ - @SerializedName("account_name_a2") - private String accountNameA2; - - /** - * 支付金额2 大于等于0 - */ - @SerializedName("pay_amount_a2") - private BigDecimal payAmountA2; - - /** - * 验证码 - */ - @SerializedName("verify_code") - private String verifyCode; - - /** - * 收款账户1账号 - */ - @SerializedName("opp_account_no_1") - private String oppAccountNo1; - - /** - *收款账户1户名 - */ - @SerializedName("opp_account_name_1") - private String oppAccountName1; - - /** - * 收款金额1 大于0 - */ - @SerializedName("opp_amount_1") - private BigDecimal oppAmount1; - - /** - * 收款账户2账号 - */ - @SerializedName("opp_account_no_2") - private String oppAccountNo2; - - /** - * 收款账户2户名 - */ - @SerializedName("opp_account_name_2") - private String oppAccountName2; - - /** - * 收款金额2 大于等于0 - */ - @SerializedName("opp_amount_2") - private BigDecimal oppAmount2; - - /** - * 摘要 - */ - @SerializedName("remark") - private String remark; -} diff --git a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtWithholdRequest.java b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtWithholdRequest.java new file mode 100644 index 0000000..383051c --- /dev/null +++ b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtWithholdRequest.java @@ -0,0 +1,92 @@ +package com.czcb.scfs.api.service.v2.customization.miyang.entpay.model; + +import com.czcb.scfs.api.core.ApiRequest; +import com.czcb.scfs.api.core.agrs.TransType; +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.math.BigDecimal; + +/** + * 300311-协议支付 + * + * @author H.T + * @since 2024-07-29 + */ +@Data +@Accessors(chain = true) +@TransType("300311") +public class EntPayAgrtWithholdRequest implements ApiRequest { + /** + * 渠道编号 + */ + @SerializedName("channel_no") + private String channelNo; + + /** + * 应用编号 + */ + @SerializedName("app_no") + private String appNo; + + /** + * 流水号 + */ + @SerializedName("serial_no") + private String serialNo; + + /** + * 操作日期 yyyy-MM-dd + */ + @SerializedName("trans_date") + private String transDate; + + /** + * 操作时间 yyyy-MM-dd HH:mm:ss + */ + @SerializedName("trans_tradetime") + private String transTradeTime; + + /** + * 付款账户账号 + */ + @SerializedName("account_no") + private String accountNo; + + /** + * 付款账户户名 + */ + @SerializedName("account_name") + private String accountName; + + /** + * 支付金额大于0 + */ + @SerializedName("pay_amount") + private BigDecimal payAmount; + + /** + * 收款账户账号 + */ + @SerializedName("opp_account_no") + private String oppAccountNo; + + /** + *收款账户户名 + */ + @SerializedName("opp_account_name") + private String oppAccountName; + + /** + * 收款金额 大于0 + */ + @SerializedName("opp_amount") + private BigDecimal oppAmount; + + /** + * 摘要 + */ + @SerializedName("remark") + private String remark; +} diff --git a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtPayResponse.java b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtWithholdResponse.java similarity index 93% rename from scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtPayResponse.java rename to scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtWithholdResponse.java index ea4430a..68ad729 100644 --- a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtPayResponse.java +++ b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v2/customization/miyang/entpay/model/EntPayAgrtWithholdResponse.java @@ -13,7 +13,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class EntPayAgrtPayResponse implements ApiResponse { +public class EntPayAgrtWithholdResponse implements ApiResponse { /** * 000000:表示成功 */ diff --git a/scfs-api-test/src/test/java/com/czcb/scfs/api/test/service/EntPayServiceTest.java b/scfs-api-test/src/test/java/com/czcb/scfs/api/test/service/EntPayServiceTest.java index 7de8386..4a86cf3 100644 --- a/scfs-api-test/src/test/java/com/czcb/scfs/api/test/service/EntPayServiceTest.java +++ b/scfs-api-test/src/test/java/com/czcb/scfs/api/test/service/EntPayServiceTest.java @@ -67,7 +67,7 @@ class EntPayServiceTest { @Test void agrtPayTest() { try { - EntPayAgrtPayResponse response = service.agrtPay(new EntPayAgrtPayRequest()); + EntPayAgrtWithholdResponse response = service.agrtWithhold(new EntPayAgrtWithholdRequest()); Assertions.assertEquals("000000", response.getRecode()); } catch (Exception e) { log.info(e.getMessage());