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

@@ -298,6 +298,10 @@ public enum ErrorCodeEnum {
MESSAGE_TEMPLATE_NOT_SUPPORT_DELETED(1610002,"只有未发布的消息能删除,请确认!",null), MESSAGE_TEMPLATE_NOT_SUPPORT_DELETED(1610002,"只有未发布的消息能删除,请确认!",null),
STORE_MESSAGE_REVOKE(1610003,"当前门店消息已撤销,请务重复操作",null), STORE_MESSAGE_REVOKE(1610003,"当前门店消息已撤销,请务重复操作",null),
STORE_MESSAGE_HANDLED(1610004,"当前门店消息已处理,无法撤销!",null), STORE_MESSAGE_HANDLED(1610004,"当前门店消息已处理,无法撤销!",null),
NOT_FLAGSHIP_STORE(16100005,"非直营店,无法跳过缴费阶段!",null),
NOT_FLAGSHIP_STORE_NOT_EXIST(16100006,"当前阶段加盟类型不能变更!",null),
; ;

View File

@@ -12,7 +12,8 @@ public enum JoinModeEnum {
OWN_STORE(3,"加盟公司自有店"), OWN_STORE(3,"加盟公司自有店"),
STRONG_FRANCHISE(4,"强加盟"), STRONG_FRANCHISE(4,"强加盟"),
DIRECT_SALES_TO_JOINING(5,"老店转加盟"), DIRECT_SALES_TO_JOINING(5,"老店转加盟"),
AFFILIATES(6,"联营店") AFFILIATES(6,"联营店"),
FLAGSHIP_STORE(7,"直营店"),
; ;
private int code; private int code;
private String desc; private String desc;

View File

@@ -85,12 +85,9 @@ public class AddSignFranchiseRequest {
private String mobile; private String mobile;
@ApiModelProperty("合同编码") @ApiModelProperty("合同编码")
@NotBlank(message = "合同编码不能为空")
private String contractCode; private String contractCode;
@ApiModelProperty("合同金额") @ApiModelProperty("合同金额")
@NotBlank(message = "合同金额不能为空")
private String contractAmount; private String contractAmount;
@NotBlank(message = "合伙签约人1不能为空")
@ApiModelProperty("合伙签约人1") @ApiModelProperty("合伙签约人1")
private String partnershipSignatoryFirst; private String partnershipSignatoryFirst;
@ApiModelProperty("合伙签约人2") @ApiModelProperty("合伙签约人2")
@@ -116,7 +113,6 @@ public class AddSignFranchiseRequest {
private String introductionAward; private String introductionAward;
//签约人1第几家分店 //签约人1第几家分店
@ApiModelProperty("签约人1第几家分店") @ApiModelProperty("签约人1第几家分店")
@NotNull(message = "签约人1第哪家分店不能为空")
private Integer partnershipSignatoryFirstWhichStore; private Integer partnershipSignatoryFirstWhichStore;
//省 //省

View File

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

View File

@@ -139,6 +139,24 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
return resp; 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 @Override
public Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user) { public Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user) {
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7); 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())){ if(StringUtils.isNotEmpty(request.getShopCode())&&this.checkShopCodeRepeat(request.getShopCode(), request.getShopId())){
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST); throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
} }
//新增校验 缴费阶段之后 不能修改加盟模式
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7);
//缴费阶段之后 加盟模式不能切换为直营店 直营店也不能切换为其他店
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId()); 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.setUpdateUserId(userId);
shopInfo.setUpdateTime(new Date()); shopInfo.setUpdateTime(new Date());
if (StringUtils.isNotEmpty(request.getShopCode())){ if (StringUtils.isNotEmpty(request.getShopCode())){

View File

@@ -35,6 +35,11 @@ public class PCFranchiseFeeController {
return ResponseResult.success(franchiseFeeService.update(request)); return ResponseResult.success(franchiseFeeService.update(request));
} }
@ApiOperation("缴费阶段跳过")
@GetMapping("/stageSkip")
public ResponseResult<Boolean> stageSkip(@RequestParam("shopId") Long shopId) {
return ResponseResult.success(franchiseFeeService.stageSkip(shopId));
}
@ApiOperation("基本信息查询") @ApiOperation("基本信息查询")
@GetMapping("/getDetail") @GetMapping("/getDetail")