This commit is contained in:
wangff
2025-11-17 10:06:36 +08:00
parent 0646022baf
commit 026dab78ff
2 changed files with 8 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
package com.cool.store.service.wallet.impl;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.RegionDao;
import com.cool.store.dao.ShopInfoDAO;
import com.cool.store.dao.ShopStageInfoDAO;
@@ -75,7 +76,7 @@ public class WalletServiceImpl implements WalletService {
.bankName(request.getBankName())
.build();
StoreAccountDTO storeAndAccount = walletApiService.createStoreAndAccount(accountRequest);
return StringUtils.isNotBlank(storeAndAccount.getAccountId());
return StringUtils.isNotBlank(storeAndAccount.getAccountNo());
}
@Override
@@ -84,6 +85,10 @@ public class WalletServiceImpl implements WalletService {
// 调用 门店签约人账户鉴权申请接口
AccountAuthenticationDTO authentication = walletApiService.authentication(new OutStoreIdRequest(shopInfo.getStoreId()));
if (Objects.nonNull(authentication)) {
if (authentication.getAccountStatus().equals(4)) {
// 判断营业执照是否已经上传,已上传则调用打标接口
addTagIfUploadLicense(request.getShopId(), shopInfo.getStoreId());
}
return new AccountAuthenticationVO(authentication.getAccountStatus());
}
throw new ServiceException(ErrorCodeEnum.WALLET_OPEN_ACCOUNT_FAIL);
@@ -97,7 +102,7 @@ public class WalletServiceImpl implements WalletService {
// 调用 门店签约人账户开通接口
log.info("开通账户");
AccountVerifyDTO accountVerifyDTO = walletApiService.openAccount(new AccountVerifyRequest(shopInfo.getStoreId(), request.getCode()));
if (!PingAnAccountStatusEnum.OPEN.getStatus().equals(accountVerifyDTO.getAccountStatus())) {
if (!CommonConstants.INDEX_ONE.equals(accountVerifyDTO.getOpenStatus())) {
throw new ServiceException(ErrorCodeEnum.WALLET_OPEN_ACCOUNT_FAIL);
}