Merge #62 into master from cc_20260313_ws_wallet
网商 * cc_20260313_ws_wallet: (3 commits squashed) - fix:新店开通网商钱包 - fix:网商钱包开通回调修改 - fix Signed-off-by: 王非凡 <accounts_67eba0c5fee9c49c80c8e2b4@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/62
This commit is contained in:
@@ -222,6 +222,13 @@ public class WalletApiService {
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/ws/v2/create", request, StoreIdDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新店创建门店网商账户
|
||||
*/
|
||||
public StoreIdDTO newStoreOpenAccount(NewStoreAccountCreateRequest request) {
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl + "/open/crm/account/ws/v1/createIndividualAccount", request, StoreIdDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交易记录列表
|
||||
* @param request
|
||||
@@ -261,4 +268,11 @@ public class WalletApiService {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网商充值账户查询
|
||||
*/
|
||||
public WsPayAccountDTO wsPayAccountQuery(OutStoreIdRequest request) {
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl + "/open/crm/account/ws/v1/queryCollectionAccount", request, WsPayAccountDTO.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,6 +180,11 @@ public interface WalletService {
|
||||
*/
|
||||
Boolean openOnlineBankAccount(CoolOpenBasicInfoRequest request);
|
||||
|
||||
/**
|
||||
* 新店开通网商银行
|
||||
*/
|
||||
Boolean newStoreOpenOnlineBankAccount(NewWsCreateAccountRequest request);
|
||||
|
||||
/**
|
||||
* 网商发送激活短信
|
||||
* @param request 门店idRequest
|
||||
@@ -192,4 +197,9 @@ public interface WalletService {
|
||||
* @return
|
||||
*/
|
||||
List<BankInfoDTO> findBankHeadName();
|
||||
|
||||
/**
|
||||
* 网商充值账户查询
|
||||
*/
|
||||
WsPayAccountDTO wsPayAccountQuery(OutStoreIdRequest request);
|
||||
}
|
||||
|
||||
@@ -334,6 +334,14 @@ public class WalletServiceImpl implements WalletService {
|
||||
if (Integer.valueOf(5).equals(request.getAccountStatus())) {
|
||||
redisUtilPool.setString(key, request.getFailReason());
|
||||
} else {
|
||||
// 开通成功,判断是否为新开店,如果是进行阶段流转
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfoByStoreId(request.getOutStoreId());
|
||||
if (Objects.nonNull(shopInfo)) {
|
||||
ShopStageInfoDO payStage = shopStageInfoDAO.getShopSubStageInfo(shopInfo.getId(), ShopSubStageEnum.SHOP_STAGE_6);
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_60.getShopSubStageStatus().equals(payStage.getShopSubStageStatus())) {
|
||||
walletOpenComplete(shopInfo);
|
||||
}
|
||||
}
|
||||
redisUtilPool.delKey(key);
|
||||
}
|
||||
// 如果创建成功,删除网商开通失败标识
|
||||
@@ -672,6 +680,29 @@ public class WalletServiceImpl implements WalletService {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean newStoreOpenOnlineBankAccount(NewWsCreateAccountRequest request) {
|
||||
ShopInfoDO store = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (Objects.isNull(store)) {
|
||||
throw new ServiceException(ErrorCodeEnum.STORE_NOT_EXIST);
|
||||
}
|
||||
NewStoreAccountCreateRequest walletRequest = new NewStoreAccountCreateRequest();
|
||||
walletRequest.setOutStoreId(store.getStoreId());
|
||||
walletRequest.setPhoneNumber(request.getSignerPhone());
|
||||
walletRequest.setAccountAliasName(request.getSignerName() + UUIDUtils.get8UUID());
|
||||
walletRequest.setLegalName(request.getSignerName());
|
||||
walletRequest.setLegalNo(request.getSignerIdCard());
|
||||
walletRequest.setLegalPhone(request.getSignerPhone());
|
||||
walletRequest.setLegalAccountCardNo(request.getSettlementCard());
|
||||
walletRequest.setLegalAccountPhone(request.getBankReservedPhone());
|
||||
walletRequest.setLegalBankNo(request.getBankBranchCode());
|
||||
walletRequest.setLegalBankName(request.getBankBranchName());
|
||||
walletRequest.setCertPhotoA(request.getSignerIdCardFront());
|
||||
walletRequest.setCertPhotoB(request.getSignerIdCardBack());
|
||||
walletApiService.newStoreOpenAccount(walletRequest);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取开店流程网商银行开通失败标记
|
||||
*/
|
||||
@@ -714,6 +745,11 @@ public class WalletServiceImpl implements WalletService {
|
||||
return walletApiService.findBankHeadName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public WsPayAccountDTO wsPayAccountQuery(OutStoreIdRequest request) {
|
||||
return walletApiService.wsPayAccountQuery(request);
|
||||
}
|
||||
|
||||
public String getStoreId(StoreShopRequest request) {
|
||||
String storeId = request.getStoreId();
|
||||
if (StringUtils.isBlank(storeId) && Objects.nonNull(request.getShopId())) {
|
||||
|
||||
Reference in New Issue
Block a user