Merge #9 into master from cc_20251208_bank

feat:老店开通 V2

* cc_20251208_bank: (6 commits squashed)

  - feat:银行的接口

  - feat:银行的接口

  - feat:bank

  - fix:网商提交开通新增法人银行卡信息

  - fix:小程序新增字典接口

  - feat:老店开通 V2

Signed-off-by: 苏竹红 <accounts_68551bf01395375227aee211@mail.teambition.com>
Merged-by: 苏竹红 <accounts_68551bf01395375227aee211@mail.teambition.com>

CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/9
This commit is contained in:
苏竹红
2025-12-09 08:55:37 +00:00
parent aaaa40f2c8
commit 1b0fb1b034
15 changed files with 252 additions and 105 deletions

View File

@@ -230,6 +230,9 @@ public class WalletHttpClientRest {
*/
@SuppressWarnings("unchecked")
private Map<String, Object> convertToMap(Object obj) {
if (obj == null){
return new HashMap<>();
}
if (obj instanceof Map) {
return (Map<String, Object>) obj;
}

View File

@@ -201,6 +201,16 @@ public class WalletApiService {
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/ws/v1/create", request, StoreIdDTO.class);
}
/**
* 老店创建门店网商账户V2
* @param request
* @return
*/
public StoreIdDTO oldStoreOpenAccountV2(OldStoreAccountCreateV2Request request){
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/ws/v2/create", request, StoreIdDTO.class);
}
/**
* 获取交易记录列表
* @param request
@@ -228,4 +238,16 @@ public class WalletApiService {
public PasswordDTO passwordIsExist(OutStoreIdRequest request){
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/v1/existPwd", request, PasswordDTO.class);
}
/**
* 查询所有的银行名称
* @return
*/
public List<BankInfoDTO> findBankHeadName(){
String bankHeadName = walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/base/v1/findBankHeadName", null, String.class);
if (StringUtil.isNotEmpty(bankHeadName)){
return JSONObject.parseArray(bankHeadName, BankInfoDTO.class);
}
return null;
}
}

View File

@@ -186,4 +186,10 @@ public interface WalletService {
* @return 是否成功
*/
Boolean onlineBankActive(StoreShopRequest request);
/**
* 网商银行查询银行名称
* @return
*/
List<BankInfoDTO> findBankHeadName();
}

View File

@@ -26,6 +26,7 @@ import com.cool.store.enums.wechat.WalletTypeEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.ApplyLicenseMapper;
import com.cool.store.request.wallet.*;
import com.cool.store.service.dict.impl.DictService;
import com.cool.store.service.wallet.WalletApiService;
import com.cool.store.service.wallet.WalletService;
import com.cool.store.utils.BeanUtil;
@@ -73,6 +74,7 @@ public class WalletServiceImpl implements WalletService {
private final StoreMasterSignerInfoDAO storeMasterSignerInfoDAO;
private final TempOpenWalletInfoDAO tempOpenWalletInfoDAO;
private final OpenBankInfoDAO openBankInfoDAO;
private final DictService dictService;
private final static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
@@ -158,6 +160,7 @@ public class WalletServiceImpl implements WalletService {
getBankRequest.setPage(pageParam);
getBankRequest.setHeadName(request.getHeadName());
getBankRequest.setKeyword(request.getKeyword());
getBankRequest.setHeadCode(request.getHeadCode());
BankListDTO bankListDTO = walletApiService.getBankList(getBankRequest);
return toPageInfo(bankListDTO.getPageData(), BankVO.class, bankListDTO.getPage());
}
@@ -524,6 +527,7 @@ public class WalletServiceImpl implements WalletService {
openBasicInfoDTO.setBankBranchCode(openBankInfo.getBankBranchCode());
openBasicInfoDTO.setBankReservedPhone(openBankInfo.getBankReservedPhone());
BeanUtil.copyProperties(openBankInfo, openBasicInfoDTO);
dictService.fillDictField(openBasicInfoDTO);
return openBasicInfoDTO;
}
//先查询当前门店
@@ -571,11 +575,20 @@ public class WalletServiceImpl implements WalletService {
onlineBankFailReOpen(request);
return true;
}
OldStoreAccountCreateRequest oldStoreAccountCreateRequest = new OldStoreAccountCreateRequest();
OldStoreAccountCreateV2Request oldStoreAccountCreateRequest = new OldStoreAccountCreateV2Request();
StoreDO store = storeDao.getByStoreNum(request.getStoreCode());
oldStoreAccountCreateRequest.setOutStoreId(store.getStoreId());
oldStoreAccountCreateRequest.setPhoneNumber(request.getSignerPhone());
oldStoreAccountCreateRequest.setAccountType(2);
oldStoreAccountCreateRequest.setLegalAccountType(2);
oldStoreAccountCreateRequest.setLegalAccountCardNo(request.getLegalBankCard());
oldStoreAccountCreateRequest.setLegalAccountPhone(request.getLegalPhone());
oldStoreAccountCreateRequest.setLegalBankNo(request.getLegalBankBranchCode());
oldStoreAccountCreateRequest.setLegalBankName(request.getLegalBankBranchName());
oldStoreAccountCreateRequest.setSignatoryAccountType(2);
oldStoreAccountCreateRequest.setSignatoryAccountCardNo(request.getSettlementCard());
oldStoreAccountCreateRequest.setSignatoryAccountPhone(request.getBankReservedPhone());
oldStoreAccountCreateRequest.setSignatoryBankNo(request.getBankBranchCode());
oldStoreAccountCreateRequest.setSignatoryBankName(request.getBankBranchName());
oldStoreAccountCreateRequest.setLicenseNo(request.getBusinessLicenseCode());
oldStoreAccountCreateRequest.setLicenseName(request.getBusinessLicenseName());
oldStoreAccountCreateRequest.setLegalName(request.getLegalName());
@@ -586,10 +599,6 @@ public class WalletServiceImpl implements WalletService {
String code = StringUtils.isNotBlank(store.getStoreNum())?store.getStoreNum():"";
String name = StringUtils.isNotBlank(store.getMiniProgramOrderStoreName())?store.getMiniProgramOrderStoreName():store.getStoreName();
oldStoreAccountCreateRequest.setAccountAliasName(code+name);
oldStoreAccountCreateRequest.setAccountCardNo(request.getSettlementCard());
oldStoreAccountCreateRequest.setAccountPhone(request.getBankReservedPhone());
oldStoreAccountCreateRequest.setBankNo(request.getBankBranchCode());
oldStoreAccountCreateRequest.setBankName(request.getBankBranchName());
oldStoreAccountCreateRequest.setCertPhotoA(request.getLegalIdCardFront());
oldStoreAccountCreateRequest.setCertPhotoB(request.getLegalIdCardBack());
oldStoreAccountCreateRequest.setLicensePhoto(request.getBusinessLicensePhoto());
@@ -598,7 +607,7 @@ public class WalletServiceImpl implements WalletService {
oldStoreAccountCreateRequest.setSignatoryNo(request.getSignerIdCard());
oldStoreAccountCreateRequest.setSignatoryPhotoA(request.getSignerIdCardFront());
oldStoreAccountCreateRequest.setSignatoryPhotoB(request.getSignerIdCardBack());
walletApiService.oldStoreOpenAccount(oldStoreAccountCreateRequest);
walletApiService.oldStoreOpenAccountV2(oldStoreAccountCreateRequest);
// 网商创建成功,记录已激活状态
redisUtilPool.setString(MessageFormat.format(RedisConstant.WALLET_ONLINE_BANK_ACTIVATED, store.getStoreId()), "1");
return Boolean.TRUE;
@@ -641,6 +650,11 @@ public class WalletServiceImpl implements WalletService {
return true;
}
@Override
public List<BankInfoDTO> findBankHeadName() {
return walletApiService.findBankHeadName();
}
public String getStoreId(StoreShopRequest request) {
String storeId = request.getStoreId();
if (StringUtils.isBlank(storeId) && Objects.nonNull(request.getShopId())) {