feat: 批量查询余额
parent
85cfee2c38
commit
325666974c
2
pom.xml
2
pom.xml
|
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.czcb.csf</groupId>
|
||||
<artifactId>scfs-api-sdk</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
<name>scfs-api-sdk</name>
|
||||
<description>scfs-api-sdk</description>
|
||||
<packaging>pom</packaging>
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
<parent>
|
||||
<groupId>com.czcb.csf</groupId>
|
||||
<artifactId>scfs-api-sdk</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.czcb.scfs</groupId>
|
||||
<artifactId>scfs-api-core</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
<name>scfs-api-core:核心模块</name>
|
||||
<description>scfs-api-core</description>
|
||||
<packaging>jar</packaging>
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
<parent>
|
||||
<groupId>com.czcb.csf</groupId>
|
||||
<artifactId>scfs-api-sdk</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.czcb.scfs</groupId>
|
||||
<artifactId>scfs-api-rsa</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
<name>scfs-api-rsa:RSA模块</name>
|
||||
<description>封装RSA、AES国密算法</description>
|
||||
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<dependency>
|
||||
<groupId>com.czcb.scfs</groupId>
|
||||
<artifactId>scfs-api-core</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
<parent>
|
||||
<groupId>com.czcb.csf</groupId>
|
||||
<artifactId>scfs-api-sdk</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.czcb.scfs</groupId>
|
||||
<artifactId>scfs-api-service</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
<name>scfs-api-service:通用类接口</name>
|
||||
<description>通用类接口</description>
|
||||
<packaging>jar</packaging>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<dependency>
|
||||
<groupId>com.czcb.scfs</groupId>
|
||||
<artifactId>scfs-api-core</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ public class AccountService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 电查询余额
|
||||
* 查询余额
|
||||
*
|
||||
* @param queryBalanceRequest QueryBalanceRequest
|
||||
* @return QueryBalanceResponse
|
||||
|
|
@ -117,6 +117,20 @@ public class AccountService {
|
|||
return httpResponse.getServiceResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询余额-批量
|
||||
*
|
||||
* @param queryBalanceBatchRequest QueryBalanceBatchRequest
|
||||
* @return QueryBalanceBatchResponse
|
||||
*/
|
||||
public QueryBalanceBatchResponse queryBalanceBatch(QueryBalanceBatchRequest queryBalanceBatchRequest) {
|
||||
String url = "/accInfo/queryBalanceBatch";
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.addHeader(API_VERSION, V_1);
|
||||
HttpResponse<QueryBalanceBatchResponse> httpResponse = apiClient.post(url, headers, queryBalanceBatchRequest.toJsonRequest(), QueryBalanceBatchResponse.class);
|
||||
return httpResponse.getServiceResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* 卡信息查询
|
||||
*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
package com.czcb.scfs.api.service.v1.account.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;
|
||||
|
||||
/**
|
||||
* 批量查询账户余额
|
||||
*
|
||||
* @author wangwei
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@TransType("100097")
|
||||
public class QueryBalanceBatchRequest 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;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@SerializedName("trans_tradetime")
|
||||
private String transTradeTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
package com.czcb.scfs.api.service.v1.account.model;
|
||||
|
||||
import com.czcb.scfs.api.core.ApiResponse;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangwei
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@Data
|
||||
public class QueryBalanceBatchResponse implements ApiResponse {
|
||||
/**
|
||||
* 000000:表示成功
|
||||
*/
|
||||
@SerializedName("recode")
|
||||
private String recode;
|
||||
|
||||
/**
|
||||
* 结果信息
|
||||
*/
|
||||
@SerializedName("recode_info")
|
||||
private String recodeInfo;
|
||||
|
||||
@SerializedName("detail_list")
|
||||
private List<DetailList> detailList;
|
||||
|
||||
/**
|
||||
* 系统日期(YYYY-MM-DD)
|
||||
*/
|
||||
@SerializedName("sys_date")
|
||||
private String sysDate;
|
||||
|
||||
/**
|
||||
* 系统时间(YYYY-MM-DD hh:mm:ss)
|
||||
*/
|
||||
@SerializedName("sys_time")
|
||||
private String sysTime;
|
||||
|
||||
@Data
|
||||
public static class DetailList implements Serializable {
|
||||
/**
|
||||
* 账号
|
||||
*/
|
||||
@SerializedName("account_no")
|
||||
private String accountNo;
|
||||
|
||||
/**
|
||||
* 户名
|
||||
*/
|
||||
@SerializedName("account_name")
|
||||
private String accountName;
|
||||
|
||||
/**
|
||||
* 账户关系(0:主 1:从)
|
||||
*/
|
||||
@SerializedName("account_relation")
|
||||
private String accountRelation;
|
||||
|
||||
/**
|
||||
* 主账号
|
||||
*/
|
||||
@SerializedName("inner_primary_account_no")
|
||||
private String innerPrimaryAccountNo;
|
||||
|
||||
/**
|
||||
* 账户类型:0:活期 6:冻结
|
||||
*/
|
||||
@SerializedName("account_class")
|
||||
private String accountClass;
|
||||
|
||||
/**
|
||||
* 当前余额
|
||||
*/
|
||||
@SerializedName("cur_balance")
|
||||
private String curBalance;
|
||||
|
||||
/**
|
||||
* 可用余额
|
||||
*/
|
||||
@SerializedName("avail_balance")
|
||||
private String availBalance;
|
||||
|
||||
/**
|
||||
* 可提现金额
|
||||
*/
|
||||
@SerializedName("withdraw_balance")
|
||||
private String withdrawBalance;
|
||||
|
||||
/**
|
||||
* 昨日余额
|
||||
*/
|
||||
@SerializedName("pre_balance")
|
||||
private String preBalance;
|
||||
|
||||
/**
|
||||
* 证件类型
|
||||
*/
|
||||
@SerializedName("id_type")
|
||||
private String idType;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
@SerializedName("id_no")
|
||||
private String idNo;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@SerializedName("mobile")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 账户状态
|
||||
*/
|
||||
@SerializedName("account_status")
|
||||
private String accountStatus;
|
||||
}
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@ public class OcrService {
|
|||
* @param ocrFileRequest OcrFileRequest
|
||||
* @return OcrFileResponse
|
||||
*/
|
||||
public OcrFileResponse downloadFile(OcrFileRequest ocrFileRequest) {
|
||||
public OcrFileResponse imageRecognize(OcrFileRequest ocrFileRequest) {
|
||||
String url = "/ocr/imageRecognize";
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.addHeader(API_VERSION, V_1);
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
<parent>
|
||||
<groupId>com.czcb.csf</groupId>
|
||||
<artifactId>scfs-api-sdk</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.czcb.scfs</groupId>
|
||||
<artifactId>scfs-api-sm</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
<name>scfs-api-sm:国密模块</name>
|
||||
<description>封装SM2、SM4国密算法</description>
|
||||
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<dependency>
|
||||
<groupId>com.czcb.scfs</groupId>
|
||||
<artifactId>scfs-api-core</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.tencent.kona/kona-crypto -->
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
<parent>
|
||||
<groupId>com.czcb.csf</groupId>
|
||||
<artifactId>scfs-api-sdk</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.czcb.scfs</groupId>
|
||||
<artifactId>scfs-api-spring-boot-starter</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
<name>scfs-spring-boot-starter</name>
|
||||
<description>scfs-spring-boot-starter</description>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
<parent>
|
||||
<groupId>com.czcb.csf</groupId>
|
||||
<artifactId>scfs-api-sdk</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.czcb.scfs</groupId>
|
||||
<artifactId>scfs-api-test</artifactId>
|
||||
<version>2.0.0-snapshot</version>
|
||||
<version>2024040901-snapshot</version>
|
||||
<name>scfs-api-test</name>
|
||||
<description>scfs-api-test</description>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,15 @@
|
|||
package com.czcb.scfs.api.test;
|
||||
|
||||
import com.czcb.scfs.api.core.util.Compression;
|
||||
import com.czcb.scfs.api.core.util.Nonce;
|
||||
import com.czcb.scfs.api.service.echo.EchoService;
|
||||
import com.czcb.scfs.api.service.v1.account.AccountService;
|
||||
import com.czcb.scfs.api.service.v1.account.model.QueryBalanceRequest;
|
||||
import com.czcb.scfs.api.service.v1.account.model.QueryBalanceResponse;
|
||||
import com.czcb.scfs.api.service.v1.file.FileService;
|
||||
import com.czcb.scfs.api.service.v1.file.model.UploadFileRequest;
|
||||
import com.czcb.scfs.api.service.v1.file.model.UploadFileResponse;
|
||||
import org.assertj.core.util.Lists;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
|
|
@ -23,6 +29,9 @@ class ApiGatewayTest {
|
|||
@Resource
|
||||
private AccountService accountService;
|
||||
|
||||
@Resource
|
||||
private FileService fileService;
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
echoService.echo();
|
||||
|
|
@ -41,4 +50,23 @@ class ApiGatewayTest {
|
|||
QueryBalanceResponse response = accountService.queryBalance(queryBalanceRequest);
|
||||
System.out.println(response);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testUploadFile() {
|
||||
UploadFileRequest fileRequest = new UploadFileRequest();
|
||||
fileRequest.setChannelNo("0000");
|
||||
fileRequest.setSerialNo(Nonce.ofNonce());
|
||||
|
||||
UploadFileRequest.FileList fileList = new UploadFileRequest.FileList();
|
||||
fileList.setFileIndex(0);
|
||||
fileList.setFileData(Compression.zipAndEncodeFromFile("C:\\Users\\Administrator.CZCB-20230627EN\\Documents\\临时文件\\rebase\\测试数据.txt"));
|
||||
|
||||
fileRequest.setFileList(Lists.list(fileList));
|
||||
fileRequest.setTransDate("2024-03-20");
|
||||
fileRequest.setTransTradeTime("2024-03-20 12:20:20");
|
||||
|
||||
|
||||
UploadFileResponse response = fileService.uploadFile(fileRequest);
|
||||
System.out.println(response);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue