Merge branch 'cc_20250829_openStore' into 'master'
Cc 20250829 open store See merge request hangzhou/java/custom_zxjp!157
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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())){
|
||||
|
||||
@@ -553,12 +553,14 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
addSignFranchiseResponse.setPartnershipSignatoryFirstWhichStore(signFranchiseDO.getPartnershipSignatoryFirstWhichStore());
|
||||
|
||||
} else {
|
||||
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());
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user