feat:添加米阳协议支付改为协议代扣

main
wb2476 2024-07-30 09:27:38 +08:00
parent b28d1d7445
commit 7f107ea95c
5 changed files with 98 additions and 140 deletions

View File

@ -61,10 +61,10 @@ public class EntPayService {
/** /**
* 300311- * 300311-
*/ */
public EntPayAgrtPayResponse agrtPay(EntPayAgrtPayRequest request) { public EntPayAgrtWithholdResponse agrtWithhold(EntPayAgrtWithholdRequest request) {
String url = "/entpay/agrt-pay"; String url = "/entpay/agrt-withhold";
HttpResponse<EntPayAgrtPayResponse> httpResponse = apiClient.post(url, HttpHeaders.apiVersionV2(), HttpResponse<EntPayAgrtWithholdResponse> httpResponse = apiClient.post(url, HttpHeaders.apiVersionV2(),
request.toJsonRequest(), EntPayAgrtPayResponse.class); request.toJsonRequest(), EntPayAgrtWithholdResponse.class);
return httpResponse.getServiceResponse(); return httpResponse.getServiceResponse();
} }
} }

View File

@ -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 A10
*/
@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;
}

View File

@ -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;
}

View File

@ -13,7 +13,7 @@ import lombok.experimental.Accessors;
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
public class EntPayAgrtPayResponse implements ApiResponse { public class EntPayAgrtWithholdResponse implements ApiResponse {
/** /**
* 000000 * 000000
*/ */

View File

@ -67,7 +67,7 @@ class EntPayServiceTest {
@Test @Test
void agrtPayTest() { void agrtPayTest() {
try { try {
EntPayAgrtPayResponse response = service.agrtPay(new EntPayAgrtPayRequest()); EntPayAgrtWithholdResponse response = service.agrtWithhold(new EntPayAgrtWithholdRequest());
Assertions.assertEquals("000000", response.getRecode()); Assertions.assertEquals("000000", response.getRecode());
} catch (Exception e) { } catch (Exception e) {
log.info(e.getMessage()); log.info(e.getMessage());