feat:直营店开店

This commit is contained in:
苏竹红
2025-09-01 16:36:44 +08:00
parent 1d2fbab0a1
commit f9c2222f10
7 changed files with 45 additions and 5 deletions

View File

@@ -23,6 +23,13 @@ public interface FranchiseFeeService {
*/
FranchiseFeeResponse getDetail(Long shopId);
/**
* 跳过 Stage
* @param shopId
* @return
*/
Boolean stageSkip(Long shopId);
Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user);
ApiResponse<Boolean> changePaymentStatus(FranchiseFeeCallBackRequest request);

View File

@@ -139,6 +139,24 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
return resp;
}
@Override
public Boolean stageSkip(Long shopId) {
//校验是否是自营店FLAGSHIP_STORE
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
if (shopInfoDO==null){
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
if (JoinModeEnum.FLAGSHIP_STORE.getCode()!=shopInfoDO.getJoinMode()){
throw new ServiceException(ErrorCodeEnum.NOT_FLAGSHIP_STORE);
}
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_7);
if (!shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus())){
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
}
shopStageInfoDAO.batchUpdateShopStageStatus(shopId,Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80));
return Boolean.TRUE;
}
@Override
public Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user) {
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7);

View File

@@ -437,7 +437,16 @@ public class ShopServiceImpl implements ShopService {
if(StringUtils.isNotEmpty(request.getShopCode())&&this.checkShopCodeRepeat(request.getShopCode(), request.getShopId())){
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
}
//新增校验 缴费阶段之后 不能修改加盟模式
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7);
//缴费阶段之后 加盟模式不能切换为直营店 直营店也不能切换为其他店
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
if (shopSubStageInfo.getShopSubStageStatus()>ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus()){
if (request.getJoinMode()!=shopInfo.getJoinMode()&&
(request.getShopId()!=JoinModeEnum.FLAGSHIP_STORE.getCode()||shopInfo.getJoinMode()!=JoinModeEnum.FLAGSHIP_STORE.getCode())){
throw new ServiceException(ErrorCodeEnum.NOT_FLAGSHIP_STORE_NOT_EXIST);
}
}
shopInfo.setUpdateUserId(userId);
shopInfo.setUpdateTime(new Date());
if (StringUtils.isNotEmpty(request.getShopCode())){