更新查询银行支行列表使用 微信
This commit is contained in:
@@ -3,10 +3,7 @@ package com.czg;
|
|||||||
import cn.hutool.core.util.ArrayUtil;
|
import cn.hutool.core.util.ArrayUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.czg.dto.req.*;
|
import com.czg.dto.req.*;
|
||||||
import com.czg.dto.resp.BankBranchDto;
|
import com.czg.dto.resp.*;
|
||||||
import com.czg.dto.resp.EntryRespDto;
|
|
||||||
import com.czg.dto.resp.EntryThirdRespDto;
|
|
||||||
import com.czg.dto.resp.QueryStatusResp;
|
|
||||||
import com.czg.exception.CzgException;
|
import com.czg.exception.CzgException;
|
||||||
import com.czg.third.alipay.AlipayEntryManager;
|
import com.czg.third.alipay.AlipayEntryManager;
|
||||||
import com.czg.third.alipay.AlipayIsvEntryManager;
|
import com.czg.third.alipay.AlipayIsvEntryManager;
|
||||||
@@ -38,6 +35,17 @@ public class EntryManager {
|
|||||||
return AlipayEntryManager.queryBankBranchList(null, instId, province, city);
|
return AlipayEntryManager.queryBankBranchList(null, instId, province, city);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询银行支行列表
|
||||||
|
* 走微信查询
|
||||||
|
*
|
||||||
|
* @param bankAliceCode 银行代码
|
||||||
|
* @param cityCode 城市编码
|
||||||
|
*/
|
||||||
|
public static WechatBankBranchRespDto queryBankBranchList(String bankAliceCode, String cityCode) {
|
||||||
|
return WechatEntryManager.queryBankBranchList(null, bankAliceCode, cityCode, 0, 200);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询微信进件状态
|
* 查询微信进件状态
|
||||||
*
|
*
|
||||||
@@ -363,16 +371,19 @@ public class EntryManager {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
WechatBankBranchRespDto respDto = queryBankBranchList("1000009547", "931");
|
||||||
|
System.out.println(respDto);
|
||||||
|
|
||||||
AggregateMerchantDto merchantDto = getTestMerchantEntryData();
|
|
||||||
|
|
||||||
|
// AggregateMerchantDto merchantDto = getTestMerchantEntryData();
|
||||||
|
//
|
||||||
|
//// verifyEntryParam(merchantDto);
|
||||||
|
//// uploadParamImage(merchantDto);
|
||||||
|
//
|
||||||
// verifyEntryParam(merchantDto);
|
// verifyEntryParam(merchantDto);
|
||||||
// uploadParamImage(merchantDto);
|
// uploadParamImage(merchantDto);
|
||||||
|
//// System.out.println(merchantDto);
|
||||||
verifyEntryParam(merchantDto);
|
// entryMerchant(merchantDto, PayCst.Platform.WECHAT);
|
||||||
uploadParamImage(merchantDto);
|
|
||||||
// System.out.println(merchantDto);
|
|
||||||
entryMerchant(merchantDto, PayCst.Platform.WECHAT);
|
|
||||||
// entryMerchant(merchantDto, PayCst.Platform.ALIPAY);
|
// entryMerchant(merchantDto, PayCst.Platform.ALIPAY);
|
||||||
// entryMerchant(merchantDto, PayCst.Platform.WECHAT, PayCst.Platform.ALIPAY);
|
// entryMerchant(merchantDto, PayCst.Platform.WECHAT, PayCst.Platform.ALIPAY);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,4 +55,16 @@ public class BankBranchDto {
|
|||||||
* 机构全称
|
* 机构全称
|
||||||
*/
|
*/
|
||||||
private String instName;
|
private String instName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联行支行边行
|
||||||
|
*/
|
||||||
|
@JSONField(name = "bank_branch_id")
|
||||||
|
private String bankBranchId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联行支行名称
|
||||||
|
*/
|
||||||
|
@JSONField(name = "bank_branch_name")
|
||||||
|
private String bankBranchName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package com.czg.dto.resp;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.annotation.JSONField;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信银行支行列表
|
||||||
|
* @author yjjie
|
||||||
|
* @date 2026/1/12 09:32
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WechatBankBranchRespDto {
|
||||||
|
|
||||||
|
// {
|
||||||
|
// "total_count" : 107,
|
||||||
|
// "count" : 1,
|
||||||
|
// "data" : [
|
||||||
|
// {
|
||||||
|
// "bank_branch_name" : "招商银行股份有限公司北京分行",
|
||||||
|
// "bank_branch_id" : "308100005019"
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// "offset" : 100,
|
||||||
|
// "links" : {
|
||||||
|
// "next" : "/v3/capital/capitallhh/banks/1000009561/branches?offset=101&limit=1",
|
||||||
|
// "prev" : "/v3/capital/capitallhh/banks/1000009561/branches?offset=99&limit=1",
|
||||||
|
// "self" : "/v3/capital/capitallhh/banks/1000009561/branches?offset=100&limit=1"
|
||||||
|
// },
|
||||||
|
// "account_bank" : "招商银行",
|
||||||
|
// "account_bank_code" : 1001,
|
||||||
|
// "bank_alias" : "招商银行",
|
||||||
|
// "bank_alias_code" : "1000009561"
|
||||||
|
//}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开户银行
|
||||||
|
*/
|
||||||
|
@JSONField(name = "account_bank")
|
||||||
|
private String accountBank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开户银行编码
|
||||||
|
*/
|
||||||
|
@JSONField(name = "account_bank_code")
|
||||||
|
private Integer accountBankCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行别名
|
||||||
|
*/
|
||||||
|
@JSONField(name = "bank_alias")
|
||||||
|
private String bankAlias;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行别名编码
|
||||||
|
*/
|
||||||
|
@JSONField(name = "bank_alias_code")
|
||||||
|
private String bankAliasCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行支行列表
|
||||||
|
*/
|
||||||
|
@JSONField(name = "data")
|
||||||
|
private List<WechatBankBranchList> data;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class WechatBankBranchList {
|
||||||
|
/**
|
||||||
|
* 银行支行名称
|
||||||
|
*/
|
||||||
|
@JSONField(name = "bank_branch_name")
|
||||||
|
private String bankBranchName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行支行编号
|
||||||
|
*/
|
||||||
|
@JSONField(name = "bank_branch_id")
|
||||||
|
private String bankBranchId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import com.czg.PayCst;
|
|||||||
import com.czg.dto.req.*;
|
import com.czg.dto.req.*;
|
||||||
import com.czg.dto.resp.EntryThirdRespDto;
|
import com.czg.dto.resp.EntryThirdRespDto;
|
||||||
import com.czg.dto.resp.QueryStatusResp;
|
import com.czg.dto.resp.QueryStatusResp;
|
||||||
|
import com.czg.dto.resp.WechatBankBranchRespDto;
|
||||||
import com.czg.exception.CzgException;
|
import com.czg.exception.CzgException;
|
||||||
import com.czg.third.wechat.dto.config.WechatPayConfigDto;
|
import com.czg.third.wechat.dto.config.WechatPayConfigDto;
|
||||||
import com.czg.third.wechat.dto.req.entry.*;
|
import com.czg.third.wechat.dto.req.entry.*;
|
||||||
@@ -140,10 +141,10 @@ public class WechatEntryManager {
|
|||||||
return JSONObject.parseObject(resp);
|
return JSONObject.parseObject(resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static JSONObject queryBankBranchList(WechatPayConfigDto configDto, String bankAliceCode, String cityCode, Integer offset, Integer limit) {
|
public static WechatBankBranchRespDto queryBankBranchList(WechatPayConfigDto configDto, String bankAliceCode, String cityCode, Integer offset, Integer limit) {
|
||||||
String resp = WechatReqUtils.getReq(configDto, "/v3/capital/capitallhh/banks/" + bankAliceCode + "/branches", Map.of("city_code", cityCode, "offset", offset, "limit", limit));
|
String resp = WechatReqUtils.getReq(configDto, "/v3/capital/capitallhh/banks/" + bankAliceCode + "/branches", Map.of("city_code", cityCode, "offset", offset, "limit", limit));
|
||||||
log.info("微信查询银行支行列表:{}", resp);
|
log.info("微信查询银行支行列表:{}", resp);
|
||||||
return JSONObject.parseObject(resp);
|
return JSONObject.parseObject(resp, WechatBankBranchRespDto.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static JSONObject queryProvinceList(WechatPayConfigDto configDto) {
|
public static JSONObject queryProvinceList(WechatPayConfigDto configDto) {
|
||||||
@@ -345,8 +346,10 @@ public class WechatEntryManager {
|
|||||||
Integer limit = 100;
|
Integer limit = 100;
|
||||||
JSONObject resp = queryBankList(null, offset, limit);
|
JSONObject resp = queryBankList(null, offset, limit);
|
||||||
|
|
||||||
// queryBankBranchList(dto, "1000009561", "110000", offset, limit);
|
// queryProvinceList(null);
|
||||||
// queryBankBranchList(dto, "1000009561", "29", offset, limit);
|
// queryCityList(null, "28");
|
||||||
|
queryBankBranchList(null, "1000009547", "931", offset, limit);
|
||||||
|
// queryBankBranchList(null, "1000009561", "29", offset, limit);
|
||||||
|
|
||||||
// queryProvinceList(dto);
|
// queryProvinceList(dto);
|
||||||
// queryCityList(dto, "28");
|
// queryCityList(dto, "28");
|
||||||
|
|||||||
Reference in New Issue
Block a user