diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/wallet/impl/WalletServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/wallet/impl/WalletServiceImpl.java index 8163018b2..e45225d51 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/wallet/impl/WalletServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/wallet/impl/WalletServiceImpl.java @@ -127,10 +127,7 @@ public class WalletServiceImpl implements WalletService { // 直接返回开通成功的,流程流转 // 判断一下缴费阶段是否开启,未开启则开启缴费阶段 try { - ShopStageInfoDO payStage = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7); - if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus().equals(payStage.getShopSubStageStatus())) { - shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70)); - } + walletOpenComplete(shopInfo); } catch (Exception e) { log.info("阶段流转失败"); } @@ -152,12 +149,20 @@ public class WalletServiceImpl implements WalletService { throw new ServiceException(ErrorCodeEnum.WALLET_OPEN_ACCOUNT_FAIL); } + walletOpenComplete(shopInfo); + + // 判断营业执照是否已经上传,已上传则调用打标接口 + addTagIfUploadLicense(request.getShopId(), shopInfo.getStoreId(), shopInfo.getLineId()); + return true; + } + + public void walletOpenComplete(ShopInfoDO shopInfo) { // 更新钱包开通阶段状态 List updateSubStageList = new ArrayList<>(); updateSubStageList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_61); // 判断一下缴费阶段是否开启,未开启则开启缴费阶段 useStandardStore 普通店 标准店开启选配店型 if (shopInfo.getUseStandardStore()==0){ - ShopStageInfoDO payStage = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7); + ShopStageInfoDO payStage = shopStageInfoDAO.getShopSubStageInfo(shopInfo.getId(), ShopSubStageEnum.SHOP_STAGE_7); if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus().equals(payStage.getShopSubStageStatus())) { updateSubStageList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70); LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId()); @@ -184,11 +189,7 @@ public class WalletServiceImpl implements WalletService { updateSubStageList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_280); } - shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), updateSubStageList); - - // 判断营业执照是否已经上传,已上传则调用打标接口 - addTagIfUploadLicense(request.getShopId(), shopInfo.getStoreId(), shopInfo.getLineId()); - return true; + shopStageInfoDAO.batchUpdateShopStageStatus(shopInfo.getId(), updateSubStageList); } @Override