Merge branch 'cc_20250829_openStore' into 'master'

Cc 20250829 open store

See merge request hangzhou/java/custom_zxjp!157
This commit is contained in:
苏竹红
2025-09-04 10:15:17 +00:00
11 changed files with 67 additions and 21 deletions

View File

@@ -298,6 +298,10 @@ public enum ErrorCodeEnum {
MESSAGE_TEMPLATE_NOT_SUPPORT_DELETED(1610002,"只有未发布的消息能删除,请确认!",null),
STORE_MESSAGE_REVOKE(1610003,"当前门店消息已撤销,请务重复操作",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,"加盟公司自有店"),
STRONG_FRANCHISE(4,"强加盟"),
DIRECT_SALES_TO_JOINING(5,"老店转加盟"),
AFFILIATES(6,"联营店")
AFFILIATES(6,"联营店"),
FLAGSHIP_STORE(7,"直营店"),
;
private int code;
private String desc;

View File

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

View File

@@ -91,20 +91,16 @@ public class BuildInformationRequest {
private String juridicalHandheldIdCardReverse;
@ApiModelProperty("结算人身份证信息是否和加盟商一致false否true是")
@NotNull(message = "结算人身份证信息是否和加盟商一致不能为空")
private Boolean settlerIsSamePartner ;
@ApiModelProperty("结算人姓名")
// @NotBlank(message = "结算人姓名 不能为空")
@JsonProperty("settlerName")
private String settlerName;
//@NotBlank(message = "结算人身份证正面 不能为空")
@Length(max = 250 , message = "结算人身份证正面 长度不能超过250")
@ApiModelProperty("结算人身份证正面(图片)")
private String settlerIdCardFront;
@NotBlank(message = "结算人手持身份证正面 不能为空")
@Length(max = 250 , message = "结算人手持身份证正面 长度不能超过250")
@ApiModelProperty("结算人手持身份证正面")
private String settlerInHandFrontPicture;
@@ -129,23 +125,19 @@ public class BuildInformationRequest {
@ApiModelProperty("结算人银行卡照片")
private String settlerBankPhotoUrl;
@NotBlank(message = "结算人银行卡背面照片 不能为空")
@Length(max = 250, message = "结算人银行卡背面照片 长度不能超过250")
@ApiModelProperty("结算人银行卡背面照片")
@JsonProperty("settlerBankBackPhotoUrl")
private String settlerBankBackPhotoUrl;
@NotBlank(message = "结算人银行卡号 不能为空")
@Length(max = 64 , message = "结算人银行卡号 长度不能超过64")
@ApiModelProperty("结算人银行卡号")
private String settlerBankNumber;
@NotBlank(message = "结算人银行卡预留手机号 不能为空")
@Length(min = 11,max = 11 , message = "结算人银行卡预留手机号 长度必须为11")
@ApiModelProperty("结算人银行卡预留手机号")
private String settlerBankMobile;
@NotBlank(message = "结算开户银行支行 不能为空")
@Length(max =100, message = "结算开户银行支行 长度不能超过100")
@ApiModelProperty("结算开户银行支行")
private String settlerBankName;

View File

@@ -128,6 +128,9 @@ public class OrderSysInfoRequest {
if (Objects.equals(joinMode, JoinModeEnum.OWN_STORE.getCode())&&this.shopCode!=null){
return true;
}
if (Objects.equals(joinMode, JoinModeEnum.FLAGSHIP_STORE.getCode())&&this.shopCode!=null){
return true;
}
if (StringUtils.isAnyBlank(this.receivingFirmName,this.receivingMsBankAccount,this.receivingMsBankBranch,this.bankUnionPayAccount,this.shopCode)){
return false;
}

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

@@ -201,6 +201,16 @@ public class BuildInformationServiceImpl implements BuildInformationService {
try {
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
if (Boolean.TRUE.equals(acquired)) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
if (JoinModeEnum.FLAGSHIP_STORE.getCode()!=shopInfoDO.getJoinMode()){
//校验结算人非空
if (StringUtils.isAnyBlank(request.getSettlerName(),request.getSettlerIdCardFront(),
request.getSettlerInHandFrontPicture(),request.getSettlerBankBackPhotoUrl(),
request.getSettlerBankNumber(),request.getSettlerBankMobile(),request.getSettlerBankName())) {
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
}
}
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(request.getShopId());
BuildInformationDO buildInformationDO = request.toDO();
OrderSysInfoDO orderSysInfoDO = getOrderSysInfoDO(request);
@@ -210,7 +220,6 @@ public class BuildInformationServiceImpl implements BuildInformationService {
} else {
orderSysInfoDAO.insertSelective(orderSysInfoDO);
}
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfoDO.getId());
if (request.getJuridicalIsSamePartner()) {
@@ -219,7 +228,7 @@ public class BuildInformationServiceImpl implements BuildInformationService {
buildInformationDO.setJuridicalIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
buildInformationDO.setJuridicalIdCardReverse(qualificationsInfoDO.getBackOfIdCard());
}
if (request.getSettlerIsSamePartner()) {
if (request.getSettlerIsSamePartner()!=null&&request.getSettlerIsSamePartner()) {
buildInformationDO.setSettlerIdCardNo(qualificationsInfoDO.getIdCardNo());
buildInformationDO.setSettlerName(lineInfoDO.getUsername());
buildInformationDO.setSettlerIdCardFront(qualificationsInfoDO.getFrontOfIdCard());

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())){

View File

@@ -553,12 +553,14 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
addSignFranchiseResponse.setPartnershipSignatoryFirstWhichStore(signFranchiseDO.getPartnershipSignatoryFirstWhichStore());
} else {
if (Objects.nonNull(franchiseFeeDO)) {
BigDecimal total = new BigDecimal(franchiseFeeDO.getYearFranchiseFee())
.add(new BigDecimal(franchiseFeeDO.getLoanMargin()))
.add(new BigDecimal(franchiseFeeDO.getFirstYearFee()))
.add(new BigDecimal(franchiseFeeDO.getFirstYearManageFee()))
.add(new BigDecimal(franchiseFeeDO.getPerformanceBond()));
addSignFranchiseResponse.setContractAmount(total.toString());
}
addSignFranchiseResponse.setMobile(lineInfoDO.getMobile());
}
addSignFranchiseResponse.setStoreName(shopInfoDO.getShopName());

View File

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