fix
This commit is contained in:
@@ -12,6 +12,6 @@ public class AccountVerifyDTO {
|
|||||||
|
|
||||||
private String outStoreId;
|
private String outStoreId;
|
||||||
|
|
||||||
private Integer accountStatus;
|
private Integer openStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.service.wallet.impl;
|
package com.cool.store.service.wallet.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dao.RegionDao;
|
import com.cool.store.dao.RegionDao;
|
||||||
import com.cool.store.dao.ShopInfoDAO;
|
import com.cool.store.dao.ShopInfoDAO;
|
||||||
import com.cool.store.dao.ShopStageInfoDAO;
|
import com.cool.store.dao.ShopStageInfoDAO;
|
||||||
@@ -75,7 +76,7 @@ public class WalletServiceImpl implements WalletService {
|
|||||||
.bankName(request.getBankName())
|
.bankName(request.getBankName())
|
||||||
.build();
|
.build();
|
||||||
StoreAccountDTO storeAndAccount = walletApiService.createStoreAndAccount(accountRequest);
|
StoreAccountDTO storeAndAccount = walletApiService.createStoreAndAccount(accountRequest);
|
||||||
return StringUtils.isNotBlank(storeAndAccount.getAccountId());
|
return StringUtils.isNotBlank(storeAndAccount.getAccountNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -84,6 +85,10 @@ public class WalletServiceImpl implements WalletService {
|
|||||||
// 调用 门店签约人账户鉴权申请接口
|
// 调用 门店签约人账户鉴权申请接口
|
||||||
AccountAuthenticationDTO authentication = walletApiService.authentication(new OutStoreIdRequest(shopInfo.getStoreId()));
|
AccountAuthenticationDTO authentication = walletApiService.authentication(new OutStoreIdRequest(shopInfo.getStoreId()));
|
||||||
if (Objects.nonNull(authentication)) {
|
if (Objects.nonNull(authentication)) {
|
||||||
|
if (authentication.getAccountStatus().equals(4)) {
|
||||||
|
// 判断营业执照是否已经上传,已上传则调用打标接口
|
||||||
|
addTagIfUploadLicense(request.getShopId(), shopInfo.getStoreId());
|
||||||
|
}
|
||||||
return new AccountAuthenticationVO(authentication.getAccountStatus());
|
return new AccountAuthenticationVO(authentication.getAccountStatus());
|
||||||
}
|
}
|
||||||
throw new ServiceException(ErrorCodeEnum.WALLET_OPEN_ACCOUNT_FAIL);
|
throw new ServiceException(ErrorCodeEnum.WALLET_OPEN_ACCOUNT_FAIL);
|
||||||
@@ -97,7 +102,7 @@ public class WalletServiceImpl implements WalletService {
|
|||||||
// 调用 门店签约人账户开通接口
|
// 调用 门店签约人账户开通接口
|
||||||
log.info("开通账户");
|
log.info("开通账户");
|
||||||
AccountVerifyDTO accountVerifyDTO = walletApiService.openAccount(new AccountVerifyRequest(shopInfo.getStoreId(), request.getCode()));
|
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);
|
throw new ServiceException(ErrorCodeEnum.WALLET_OPEN_ACCOUNT_FAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user