文件管理
parent
114a80b8f1
commit
fceed2c3bf
|
|
@ -60,4 +60,18 @@ public class AccountService {
|
||||||
HttpResponse<QueryBalanceResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), QueryBalanceResponse.class);
|
HttpResponse<QueryBalanceResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), QueryBalanceResponse.class);
|
||||||
return httpResponse.getServiceResponse();
|
return httpResponse.getServiceResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡信息查询
|
||||||
|
*
|
||||||
|
* @param request QueryCardInfoRequest
|
||||||
|
* @return QueryCardInfoResponse
|
||||||
|
*/
|
||||||
|
public QueryCardInfoResponse queryCardInfo(QueryCardInfoRequest request) {
|
||||||
|
String url = "/accInfo/queryCardInfo";
|
||||||
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
headers.addHeader(API_VERSION, V_1);
|
||||||
|
HttpResponse<QueryCardInfoResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), QueryCardInfoResponse.class);
|
||||||
|
return httpResponse.getServiceResponse();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
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("100025")
|
||||||
|
public class QueryCardInfoRequest implements ApiRequest {
|
||||||
|
/**
|
||||||
|
* 渠道编号
|
||||||
|
*/
|
||||||
|
@SerializedName("channel_no")
|
||||||
|
private String channelNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用编号
|
||||||
|
*/
|
||||||
|
@SerializedName("app_no")
|
||||||
|
private String appNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水号
|
||||||
|
*/
|
||||||
|
@SerializedName("serial_no")
|
||||||
|
private String serialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡号
|
||||||
|
*/
|
||||||
|
@SerializedName("card_no")
|
||||||
|
private String cardNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作日期
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_date")
|
||||||
|
private String transDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作时间
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_tradetime")
|
||||||
|
private String transTradeTime;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangwei
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class QueryCardInfoResponse implements ApiResponse {
|
||||||
|
/**
|
||||||
|
* 000000:表示成功
|
||||||
|
*/
|
||||||
|
@SerializedName("recode")
|
||||||
|
private String recode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果信息
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_Info")
|
||||||
|
private String recodeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行编码
|
||||||
|
*/
|
||||||
|
@SerializedName("bank_no")
|
||||||
|
private String bankNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行名称
|
||||||
|
*/
|
||||||
|
@SerializedName("bank_name")
|
||||||
|
private String bankName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡类型,0:借记卡 1:准贷记卡 2:贷记卡
|
||||||
|
*/
|
||||||
|
@SerializedName("card_type")
|
||||||
|
private String cardType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付行号
|
||||||
|
*/
|
||||||
|
@SerializedName("pay_bank_no")
|
||||||
|
private String payBankNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统日期(YYYY-MM-DD)
|
||||||
|
*/
|
||||||
|
@SerializedName("sys_date")
|
||||||
|
private String sysDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统时间(YYYY-MM-DD hh:mm:ss)
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_Info")
|
||||||
|
private String sysTime;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.czcb.scfs.api.service.v1.face;
|
||||||
|
|
||||||
|
import com.czcb.scfs.api.core.ApiClient;
|
||||||
|
import com.czcb.scfs.api.core.http.HttpHeaders;
|
||||||
|
import com.czcb.scfs.api.core.http.HttpResponse;
|
||||||
|
import com.czcb.scfs.api.service.v1.face.model.FaceFileRequest;
|
||||||
|
import com.czcb.scfs.api.service.v1.face.model.FaceFileResponse;
|
||||||
|
|
||||||
|
import static com.czcb.scfs.api.core.Constants.API_VERSION;
|
||||||
|
import static com.czcb.scfs.api.core.Constants.V_1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangwei
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
public class FaceService {
|
||||||
|
|
||||||
|
private final ApiClient apiClient;
|
||||||
|
|
||||||
|
public FaceService(ApiClient apiClient) {
|
||||||
|
this.apiClient = apiClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人脸识别
|
||||||
|
*
|
||||||
|
* @param request FaceFileRequest
|
||||||
|
* @return FaceFileResponse
|
||||||
|
*/
|
||||||
|
public FaceFileResponse face(FaceFileRequest request) {
|
||||||
|
String url = "/face/imageRecognize";
|
||||||
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
headers.addHeader(API_VERSION, V_1);
|
||||||
|
HttpResponse<FaceFileResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), FaceFileResponse.class);
|
||||||
|
return httpResponse.getServiceResponse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
package com.czcb.scfs.api.service.v1.face.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("100008")
|
||||||
|
public class FaceFileRequest implements ApiRequest {
|
||||||
|
/**
|
||||||
|
* 渠道编号
|
||||||
|
*/
|
||||||
|
@SerializedName("channel_no")
|
||||||
|
private String channelNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用编号
|
||||||
|
*/
|
||||||
|
@SerializedName("app_no")
|
||||||
|
private String appNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水号
|
||||||
|
*/
|
||||||
|
@SerializedName("serial_no")
|
||||||
|
private String serialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件类型,04:人脸照片
|
||||||
|
*/
|
||||||
|
@SerializedName("file_type")
|
||||||
|
private String fileType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片/文件的BASE64的zip文件,身份证人像面或者国徽面图片或银行卡正面图片的BASE64的zip文件,大小不超过 3 M
|
||||||
|
*/
|
||||||
|
@SerializedName("file_data")
|
||||||
|
private String fileData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份证号码
|
||||||
|
*/
|
||||||
|
@SerializedName("id_no")
|
||||||
|
private String idNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
@SerializedName("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作日期
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_date")
|
||||||
|
private String transDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作时间
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_tradetime")
|
||||||
|
private String transTradeTime;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.czcb.scfs.api.service.v1.face.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 FaceFileResponse implements ApiResponse {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 000000:表示成功
|
||||||
|
*/
|
||||||
|
@SerializedName("recode")
|
||||||
|
private String recode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果信息
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_Info")
|
||||||
|
private String recodeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件编号
|
||||||
|
*/
|
||||||
|
@SerializedName("file_no")
|
||||||
|
private String fileNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统日期(YYYY-MM-DD)
|
||||||
|
*/
|
||||||
|
@SerializedName("sys_date")
|
||||||
|
private String sysDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统时间(YYYY-MM-DD hh:mm:ss)
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_Info")
|
||||||
|
private String sysTime;
|
||||||
|
}
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
//package com.czcb.scfs.api.service.file;
|
|
||||||
//
|
|
||||||
//import com.czcb.scfs.api.core.ApiClient;
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * 文件下载
|
|
||||||
// *
|
|
||||||
// * @since 2.0.0
|
|
||||||
// */
|
|
||||||
//public class FileDownloadService {
|
|
||||||
// private final ApiClient apiClient;
|
|
||||||
//
|
|
||||||
// public FileDownloadService(ApiClient apiClient) {
|
|
||||||
// this.apiClient = apiClient;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void download() {
|
|
||||||
// // 待实现
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
package com.czcb.scfs.api.service.v1.file;
|
||||||
|
|
||||||
|
import com.czcb.scfs.api.core.ApiClient;
|
||||||
|
import com.czcb.scfs.api.core.http.HttpHeaders;
|
||||||
|
import com.czcb.scfs.api.core.http.HttpResponse;
|
||||||
|
import com.czcb.scfs.api.service.v1.file.model.DownloadFileRequest;
|
||||||
|
import com.czcb.scfs.api.service.v1.file.model.DownloadFileResponse;
|
||||||
|
import com.czcb.scfs.api.service.v1.file.model.UploadFileRequest;
|
||||||
|
import com.czcb.scfs.api.service.v1.file.model.UploadFileResponse;
|
||||||
|
|
||||||
|
import static com.czcb.scfs.api.core.Constants.API_VERSION;
|
||||||
|
import static com.czcb.scfs.api.core.Constants.V_1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件下载
|
||||||
|
*
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
public class FileService {
|
||||||
|
private final ApiClient apiClient;
|
||||||
|
|
||||||
|
public FileService(ApiClient apiClient) {
|
||||||
|
this.apiClient = apiClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件
|
||||||
|
*
|
||||||
|
* @param request UploadFileRequest
|
||||||
|
* @return UploadFileResponse
|
||||||
|
*/
|
||||||
|
public UploadFileResponse uploadFile(UploadFileRequest request) {
|
||||||
|
String url = "/upload/uploadFile";
|
||||||
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
headers.addHeader(API_VERSION, V_1);
|
||||||
|
HttpResponse<UploadFileResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), UploadFileResponse.class);
|
||||||
|
return httpResponse.getServiceResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载文件
|
||||||
|
*
|
||||||
|
* @param request DownloadFileRequest
|
||||||
|
* @return DownloadFileResponse
|
||||||
|
*/
|
||||||
|
public DownloadFileResponse downloadFile(DownloadFileRequest request) {
|
||||||
|
String url = "/upload/downloadFile";
|
||||||
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
headers.addHeader(API_VERSION, V_1);
|
||||||
|
HttpResponse<DownloadFileResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), DownloadFileResponse.class);
|
||||||
|
return httpResponse.getServiceResponse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
//package com.czcb.scfs.api.service.file;
|
|
||||||
//
|
|
||||||
//import com.czcb.scfs.api.core.ApiClient;
|
|
||||||
//import com.czcb.scfs.api.core.http.HttpHeaders;
|
|
||||||
//import com.czcb.scfs.api.core.http.HttpResponse;
|
|
||||||
//import com.czcb.scfs.api.service.file.model.FaceFileRequest;
|
|
||||||
//import com.czcb.scfs.api.service.file.model.FaceFileResponse;
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * 文件上传
|
|
||||||
// *
|
|
||||||
// * @since 2.0.0
|
|
||||||
// */
|
|
||||||
//public class FileUploadService {
|
|
||||||
// private final ApiClient apiClient;
|
|
||||||
//
|
|
||||||
// public FileUploadService(ApiClient apiClient) {
|
|
||||||
// this.apiClient = apiClient;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public FaceFileResponse face(FaceFileRequest request) {
|
|
||||||
// String url = "/face/test";
|
|
||||||
// HttpHeaders headers = new HttpHeaders();
|
|
||||||
// HttpResponse<FaceFileResponse> httpResponse = apiClient.post(url, headers, request.toJson(), FaceFileResponse.class);
|
|
||||||
// return httpResponse.getServiceResponse();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package com.czcb.scfs.api.service.v1.file.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.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangwei
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TransType("100010")
|
||||||
|
public class DownloadFileRequest implements ApiRequest {
|
||||||
|
/**
|
||||||
|
* 渠道编号
|
||||||
|
*/
|
||||||
|
@SerializedName("channel_no")
|
||||||
|
private String channelNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水号
|
||||||
|
*/
|
||||||
|
@SerializedName("serial_no")
|
||||||
|
private String serialNo;
|
||||||
|
|
||||||
|
@SerializedName("file_list")
|
||||||
|
private List<FileList> fileList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作日期
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_date")
|
||||||
|
private String transDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作时间
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_tradetime")
|
||||||
|
private String transTradeTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class FileList {
|
||||||
|
/**
|
||||||
|
* 文件序号
|
||||||
|
*/
|
||||||
|
@SerializedName("file_index")
|
||||||
|
private int fileIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* base64编码的zip文件
|
||||||
|
*/
|
||||||
|
@SerializedName("file_data")
|
||||||
|
private String fileData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.czcb.scfs.api.service.v1.file.model;
|
||||||
|
|
||||||
|
import com.czcb.scfs.api.core.ApiResponse;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangwei
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DownloadFileResponse implements ApiResponse {
|
||||||
|
/**
|
||||||
|
* 000000:表示成功
|
||||||
|
*/
|
||||||
|
@SerializedName("recode")
|
||||||
|
private String recode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果信息
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_Info")
|
||||||
|
private String recodeInfo;
|
||||||
|
|
||||||
|
@SerializedName("file_list")
|
||||||
|
private List<FileList> fileList;
|
||||||
|
/**
|
||||||
|
* 系统日期(YYYY-MM-DD)
|
||||||
|
*/
|
||||||
|
@SerializedName("sys_date")
|
||||||
|
private String sysDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统时间(YYYY-MM-DD hh:mm:ss)
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_Info")
|
||||||
|
private String sysTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class FileList {
|
||||||
|
/**
|
||||||
|
* 文件序号
|
||||||
|
*/
|
||||||
|
@SerializedName("file_index")
|
||||||
|
private int fileIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* base64编码的zip文件
|
||||||
|
*/
|
||||||
|
@SerializedName("file_data")
|
||||||
|
private String fileData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,85 +0,0 @@
|
||||||
package com.czcb.scfs.api.service.v1.file.model;
|
|
||||||
|
|
||||||
import com.czcb.scfs.api.core.ApiFileRequest;
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author wangwei
|
|
||||||
* @since 2.0.0
|
|
||||||
*/
|
|
||||||
public class FaceFileRequest implements ApiFileRequest {
|
|
||||||
/**
|
|
||||||
* 渠道编号
|
|
||||||
*/
|
|
||||||
@SerializedName("channel_no")
|
|
||||||
private String channelNo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 应用编号
|
|
||||||
*/
|
|
||||||
@SerializedName("app_no")
|
|
||||||
private String appNo;
|
|
||||||
|
|
||||||
@SerializedName("file_type")
|
|
||||||
private String fileType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* base64 编码数据
|
|
||||||
*/
|
|
||||||
@SerializedName("file_data")
|
|
||||||
private String fileData;
|
|
||||||
|
|
||||||
@SerializedName("trans_date")
|
|
||||||
private String transDate;
|
|
||||||
|
|
||||||
@SerializedName("trans_tradetime")
|
|
||||||
private String transTradetime;
|
|
||||||
|
|
||||||
public String getChannelNo() {
|
|
||||||
return channelNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setChannelNo(String channelNo) {
|
|
||||||
this.channelNo = channelNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppNo() {
|
|
||||||
return appNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAppNo(String appNo) {
|
|
||||||
this.appNo = appNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileType() {
|
|
||||||
return fileType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileType(String fileType) {
|
|
||||||
this.fileType = fileType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileData() {
|
|
||||||
return fileData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileData(String fileData) {
|
|
||||||
this.fileData = fileData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTransDate() {
|
|
||||||
return transDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTransDate(String transDate) {
|
|
||||||
this.transDate = transDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTransTradetime() {
|
|
||||||
return transTradetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTransTradetime(String transTradetime) {
|
|
||||||
this.transTradetime = transTradetime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
package com.czcb.scfs.api.service.v1.file.model;
|
|
||||||
|
|
||||||
import com.czcb.scfs.api.core.ApiFileResponse;
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author wangwei
|
|
||||||
* @since 2.0.0
|
|
||||||
*/
|
|
||||||
public class FaceFileResponse implements ApiFileResponse {
|
|
||||||
|
|
||||||
@SerializedName("trans_date")
|
|
||||||
private String transDate;
|
|
||||||
|
|
||||||
@SerializedName("trans_tradetime")
|
|
||||||
private String transTradetime;
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package com.czcb.scfs.api.service.v1.file.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.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangwei
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TransType("100009")
|
||||||
|
public class UploadFileRequest implements ApiRequest {
|
||||||
|
/**
|
||||||
|
* 渠道编号
|
||||||
|
*/
|
||||||
|
@SerializedName("channel_no")
|
||||||
|
private String channelNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水号
|
||||||
|
*/
|
||||||
|
@SerializedName("serial_no")
|
||||||
|
private String serialNo;
|
||||||
|
|
||||||
|
@SerializedName("file_list")
|
||||||
|
private List<FileList> fileList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作日期
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_date")
|
||||||
|
private String transDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作时间
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_tradetime")
|
||||||
|
private String transTradeTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class FileList {
|
||||||
|
/**
|
||||||
|
* 文件序号
|
||||||
|
*/
|
||||||
|
@SerializedName("file_index")
|
||||||
|
private int fileIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* base64编码的zip文件
|
||||||
|
*/
|
||||||
|
@SerializedName("file_data")
|
||||||
|
private String fileData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.czcb.scfs.api.service.v1.file.model;
|
||||||
|
|
||||||
|
import com.czcb.scfs.api.core.ApiResponse;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangwei
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UploadFileResponse implements ApiResponse {
|
||||||
|
/**
|
||||||
|
* 000000:表示成功
|
||||||
|
*/
|
||||||
|
@SerializedName("recode")
|
||||||
|
private String recode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果信息
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_Info")
|
||||||
|
private String recodeInfo;
|
||||||
|
|
||||||
|
@SerializedName("file_list")
|
||||||
|
private List<FileList> fileList;
|
||||||
|
/**
|
||||||
|
* 系统日期(YYYY-MM-DD)
|
||||||
|
*/
|
||||||
|
@SerializedName("sys_date")
|
||||||
|
private String sysDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统时间(YYYY-MM-DD hh:mm:ss)
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_Info")
|
||||||
|
private String sysTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class FileList {
|
||||||
|
/**
|
||||||
|
* 文件序号
|
||||||
|
*/
|
||||||
|
@SerializedName("file_index")
|
||||||
|
private int fileIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件编号
|
||||||
|
*/
|
||||||
|
@SerializedName("file_no")
|
||||||
|
private String fileNo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.czcb.scfs.api.service.v1.ocr;
|
||||||
|
|
||||||
|
import com.czcb.scfs.api.core.ApiClient;
|
||||||
|
import com.czcb.scfs.api.core.http.HttpHeaders;
|
||||||
|
import com.czcb.scfs.api.core.http.HttpResponse;
|
||||||
|
import com.czcb.scfs.api.service.v1.ocr.model.OcrFileRequest;
|
||||||
|
import com.czcb.scfs.api.service.v1.ocr.model.OcrFileResponse;
|
||||||
|
|
||||||
|
import static com.czcb.scfs.api.core.Constants.API_VERSION;
|
||||||
|
import static com.czcb.scfs.api.core.Constants.V_1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangwei
|
||||||
|
* @since 2.0.0
|
||||||
|
*/
|
||||||
|
public class OcrService {
|
||||||
|
private final ApiClient apiClient;
|
||||||
|
|
||||||
|
public OcrService(ApiClient apiClient) {
|
||||||
|
this.apiClient = apiClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ORC识别
|
||||||
|
*
|
||||||
|
* @param request OcrFileRequest
|
||||||
|
* @return OcrFileResponse
|
||||||
|
*/
|
||||||
|
public OcrFileResponse downloadFile(OcrFileRequest request) {
|
||||||
|
String url = "/ocr/imageRecognize";
|
||||||
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
headers.addHeader(API_VERSION, V_1);
|
||||||
|
HttpResponse<OcrFileResponse> httpResponse = apiClient.post(url, headers, request.toJsonRequest(), OcrFileResponse.class);
|
||||||
|
return httpResponse.getServiceResponse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.czcb.scfs.api.service.v1.ocr.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("100007")
|
||||||
|
public class OcrFileRequest implements ApiRequest {
|
||||||
|
/**
|
||||||
|
* 渠道编号
|
||||||
|
*/
|
||||||
|
@SerializedName("channel_no")
|
||||||
|
private String channelNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用编号
|
||||||
|
*/
|
||||||
|
@SerializedName("app_no")
|
||||||
|
private String appNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流水号
|
||||||
|
*/
|
||||||
|
@SerializedName("serial_no")
|
||||||
|
private String serialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件类型,01:人像面 02:国徽面 03:银行卡(暂不支持银行卡)
|
||||||
|
*/
|
||||||
|
@SerializedName("file_type")
|
||||||
|
private String fileType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片/文件的BASE64的zip文件,身份证人像面或者国徽面图片或银行卡正面图片的BASE64的zip文件,大小不超过 3 M
|
||||||
|
*/
|
||||||
|
@SerializedName("file_data")
|
||||||
|
private String fileData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作日期
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_date")
|
||||||
|
private String transDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作时间
|
||||||
|
*/
|
||||||
|
@SerializedName("trans_tradetime")
|
||||||
|
private String transTradeTime;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
package com.czcb.scfs.api.service.v1.ocr.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 OcrFileResponse implements ApiResponse {
|
||||||
|
/**
|
||||||
|
* 000000:表示成功
|
||||||
|
*/
|
||||||
|
@SerializedName("recode")
|
||||||
|
private String recode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果信息
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_Info")
|
||||||
|
private String recodeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件编号
|
||||||
|
*/
|
||||||
|
@SerializedName("file_no")
|
||||||
|
private String fileNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
@SerializedName("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
@SerializedName("sex")
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 民族
|
||||||
|
*/
|
||||||
|
@SerializedName("nation")
|
||||||
|
private String nation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出生日期
|
||||||
|
*/
|
||||||
|
@SerializedName("birth")
|
||||||
|
private String birth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份证号
|
||||||
|
*/
|
||||||
|
@SerializedName("idcard")
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 住址
|
||||||
|
*/
|
||||||
|
@SerializedName("address")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签发机关
|
||||||
|
*/
|
||||||
|
@SerializedName("authority")
|
||||||
|
private String authority;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效日期
|
||||||
|
*/
|
||||||
|
@SerializedName("validDate")
|
||||||
|
private String validDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行卡卡号
|
||||||
|
*/
|
||||||
|
@SerializedName("bankcardNo")
|
||||||
|
private String bankcardNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行卡有效期
|
||||||
|
*/
|
||||||
|
@SerializedName("bankcardValidDate")
|
||||||
|
private String bankcardValidDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行卡卡片照片
|
||||||
|
*/
|
||||||
|
@SerializedName("bankcardNoPhoto")
|
||||||
|
private String bankcardNoPhoto;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统日期(YYYY-MM-DD)
|
||||||
|
*/
|
||||||
|
@SerializedName("sys_date")
|
||||||
|
private String sysDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统时间(YYYY-MM-DD hh:mm:ss)
|
||||||
|
*/
|
||||||
|
@SerializedName("recode_Info")
|
||||||
|
private String sysTime;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue