From f3b319173a60a850ff681e63cf384702f024fc07 Mon Sep 17 00:00:00 2001 From: 13009 Date: Wed, 20 Mar 2024 13:34:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v1/bmd/model/ApplyBmdQueryRequest.java | 1 + .../scfs/api/service/v1/pay/PayService.java | 29 +++++++ .../v1/pay/model/EarnestInsureRequest.java | 80 +++++++++++++++++++ .../v1/pay/model/EarnestInsureResponse.java | 49 ++++++++++++ .../v1/pay/model/EarnestReleaseRequest.java | 80 +++++++++++++++++++ .../v1/pay/model/EarnestReleaseResponse.java | 38 +++++++++ .../spring/boot/starter/RsaConfiguration.java | 1 - 7 files changed, 277 insertions(+), 1 deletion(-) create mode 100644 scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestInsureRequest.java create mode 100644 scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestInsureResponse.java create mode 100644 scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestReleaseRequest.java create mode 100644 scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestReleaseResponse.java diff --git a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/bmd/model/ApplyBmdQueryRequest.java b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/bmd/model/ApplyBmdQueryRequest.java index 17a92d3..fafceab 100644 --- a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/bmd/model/ApplyBmdQueryRequest.java +++ b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/bmd/model/ApplyBmdQueryRequest.java @@ -8,6 +8,7 @@ import lombok.experimental.Accessors; /** * 融资白名单查询 + * * @author wangwei * @since 2.0.0 */ diff --git a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/PayService.java b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/PayService.java index 3cd5e1e..a3d9abc 100644 --- a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/PayService.java +++ b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/PayService.java @@ -88,4 +88,33 @@ public class PayService { HttpResponse httpResponse = apiClient.post(url, headers, transferSelfAccRequest.toJsonRequest(), TransferSelfAccResponse.class); return httpResponse.getServiceResponse(); } + + /** + * 保证金缴纳 + * + * @param earnestInsureRequest EarnestInsureRequest + * @return EarnestInsureResponse + */ + public EarnestInsureResponse insure(EarnestInsureRequest earnestInsureRequest) { + String url = "/loanbzjapi/insure"; + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(API_VERSION, V_1); + HttpResponse httpResponse = apiClient.post(url, headers, earnestInsureRequest.toJsonRequest(), EarnestInsureResponse.class); + return httpResponse.getServiceResponse(); + } + + + /** + * 保证金释放 + * + * @param earnestReleaseRequest EarnestReleaseRequest + * @return EarnestReleaseResponse + */ + public EarnestReleaseResponse insure(EarnestReleaseRequest earnestReleaseRequest) { + String url = "/loanbzjapi/repay"; + HttpHeaders headers = new HttpHeaders(); + headers.addHeader(API_VERSION, V_1); + HttpResponse httpResponse = apiClient.post(url, headers, earnestReleaseRequest.toJsonRequest(), EarnestReleaseResponse.class); + return httpResponse.getServiceResponse(); + } } diff --git a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestInsureRequest.java b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestInsureRequest.java new file mode 100644 index 0000000..db8e0e1 --- /dev/null +++ b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestInsureRequest.java @@ -0,0 +1,80 @@ +package com.czcb.scfs.api.service.v1.pay.model; + +import com.czcb.scfs.api.core.ApiRequest; +import com.czcb.scfs.api.service.TransType; +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.math.BigDecimal; + +/** + * 保证金缴纳 + * + * @author wangwei + * @since 2.0.0 + */ +@Data +@Accessors(chain = true) +@TransType("102010") +public class EarnestInsureRequest implements ApiRequest { + /** + * 渠道编号 + */ + @SerializedName("channel_no") + private String channelNo; + + /** + * 应用编号 + */ + @SerializedName("app_no") + private String appNo; + + /** + * 流水号 + */ + @SerializedName("serial_no") + private String serialNo; + + /** + * 账号(A1账户) + */ + @SerializedName("account_no") + private String accountNo; + + /** + * 户名(A1账户) + */ + @SerializedName("account_name") + private String accountName; + + /** + * 缴纳金额 + */ + @SerializedName("trade_amount") + private BigDecimal tradeAmount; + + /** + * 验证码,短信验证码 + */ + @SerializedName("verify_code") + private String verifyCode; + + /** + * 摘要 + */ + @SerializedName("remark") + private String remark; + + /** + * 操作日期 + */ + @SerializedName("original_serialno") + private String transDate; + + /** + * 操作时间 + */ + @SerializedName("trans_tradetime") + private String transTradeTime; +} diff --git a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestInsureResponse.java b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestInsureResponse.java new file mode 100644 index 0000000..356c63e --- /dev/null +++ b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestInsureResponse.java @@ -0,0 +1,49 @@ +package com.czcb.scfs.api.service.v1.pay.model; + +import com.czcb.scfs.api.core.ApiResponse; +import com.google.gson.annotations.SerializedName; +import lombok.Data; + +/** + * 保证金缴纳 + * + * @author wangwei + * @since 2.0.0 + */ +@Data +public class EarnestInsureResponse implements ApiResponse { + /** + * 000000:表示成功 + */ + @SerializedName("recode") + private String recode; + + /** + * 结果信息 + */ + @SerializedName("recode_Info") + private String recodeInfo; + + /** + * 保证金账户账号 + */ + @SerializedName("account_no_bzj") + private String accountNoBzj; + /** + * 保证金账户户名 + */ + @SerializedName("account_name_bzj") + private String accountNameBzj; + + /** + * 系统日期(YYYY-MM-DD) + */ + @SerializedName("sys_date") + private String sysDate; + + /** + * 系统时间(YYYY-MM-DD hh:mm:ss) + */ + @SerializedName("sys_time") + private String sysTime; +} diff --git a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestReleaseRequest.java b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestReleaseRequest.java new file mode 100644 index 0000000..3d6a007 --- /dev/null +++ b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestReleaseRequest.java @@ -0,0 +1,80 @@ +package com.czcb.scfs.api.service.v1.pay.model; + +import com.czcb.scfs.api.core.ApiRequest; +import com.czcb.scfs.api.service.TransType; +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.math.BigDecimal; + +/** + * 保证金释放 + * + * @author wangwei + * @since 2.0.0 + */ +@Data +@Accessors(chain = true) +@TransType("102011") +public class EarnestReleaseRequest implements ApiRequest { + /** + * 渠道编号 + */ + @SerializedName("channel_no") + private String channelNo; + + /** + * 应用编号 + */ + @SerializedName("app_no") + private String appNo; + + /** + * 流水号 + */ + @SerializedName("serial_no") + private String serialNo; + + /** + * 账号(A1账户) + */ + @SerializedName("account_no") + private String accountNo; + + /** + * 户名(A1账户) + */ + @SerializedName("account_name") + private String accountName; + + /** + * 释放金额 + */ + @SerializedName("trade_amount") + private BigDecimal tradeAmount; + + /** + * 验证码,短信验证码 + */ + @SerializedName("verify_code") + private String verifyCode; + + /** + * 摘要 + */ + @SerializedName("remark") + private String remark; + + /** + * 操作日期 + */ + @SerializedName("original_serialno") + private String transDate; + + /** + * 操作时间 + */ + @SerializedName("trans_tradetime") + private String transTradeTime; +} diff --git a/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestReleaseResponse.java b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestReleaseResponse.java new file mode 100644 index 0000000..74ecaab --- /dev/null +++ b/scfs-api-service/src/main/java/com/czcb/scfs/api/service/v1/pay/model/EarnestReleaseResponse.java @@ -0,0 +1,38 @@ +package com.czcb.scfs.api.service.v1.pay.model; + +import com.czcb.scfs.api.core.ApiResponse; +import com.google.gson.annotations.SerializedName; +import lombok.Data; + +/** + * 保证金释放 + * + * @author wangwei + * @since 2.0.0 + */ +@Data +public class EarnestReleaseResponse implements ApiResponse { + /** + * 000000:表示成功 + */ + @SerializedName("recode") + private String recode; + + /** + * 结果信息 + */ + @SerializedName("recode_Info") + private String recodeInfo; + + /** + * 系统日期(YYYY-MM-DD) + */ + @SerializedName("sys_date") + private String sysDate; + + /** + * 系统时间(YYYY-MM-DD hh:mm:ss) + */ + @SerializedName("sys_time") + private String sysTime; +} diff --git a/scfs-api-spring-boot-starter/src/main/java/com/czcb/scfs/spring/boot/starter/RsaConfiguration.java b/scfs-api-spring-boot-starter/src/main/java/com/czcb/scfs/spring/boot/starter/RsaConfiguration.java index 56e03e0..dcc2dab 100644 --- a/scfs-api-spring-boot-starter/src/main/java/com/czcb/scfs/spring/boot/starter/RsaConfiguration.java +++ b/scfs-api-spring-boot-starter/src/main/java/com/czcb/scfs/spring/boot/starter/RsaConfiguration.java @@ -4,7 +4,6 @@ import com.czcb.scfs.api.core.cipher.StoreType; import com.czcb.scfs.api.core.util.PemFile; import com.czcb.scfs.api.rsa.RsaProfile; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import javax.annotation.Resource;