Merge branch 'cc_20250325_select' into 'master'

fix

See merge request hangzhou/java/custom_zxjp!59
This commit is contained in:
苏竹红
2025-04-17 16:36:59 +00:00
4 changed files with 19 additions and 8 deletions

View File

@@ -200,4 +200,7 @@ public class BuildInformationResponse {
@ApiModelProperty(value = "点餐小程序店铺名称") @ApiModelProperty(value = "点餐小程序店铺名称")
private String miniProgramsShopName; private String miniProgramsShopName;
@ApiModelProperty(value = "建店资料当前阶段状态")
private Integer shopSubStageStatus;
} }

View File

@@ -66,6 +66,8 @@ public class BuildInformationServiceImpl implements BuildInformationService {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
} }
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId()); LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
response.setShopSubStageStatus(shopSubStageInfo.getShopSubStageStatus());
response.setUsername(lineInfoDO.getUsername()); response.setUsername(lineInfoDO.getUsername());
response.setShopId(shopId); response.setShopId(shopId);
response.setShopName(shopInfo.getShopName()); response.setShopName(shopInfo.getShopName());

View File

@@ -1,5 +1,6 @@
package com.cool.store.service.impl; package com.cool.store.service.impl;
import com.cool.store.constants.CommonConstants;
import com.cool.store.context.LoginUserInfo; import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.*; import com.cool.store.dao.*;
import com.cool.store.entity.*; import com.cool.store.entity.*;
@@ -74,6 +75,8 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
OrderSysInfoDO orderSysInfoDO = orderSysInfoDAO.selectByShopId(request.getShopId()); OrderSysInfoDO orderSysInfoDO = orderSysInfoDAO.selectByShopId(request.getShopId());
if (Objects.isNull(orderSysInfoDO)) { if (Objects.isNull(orderSysInfoDO)) {
orderSysInfoDO = new OrderSysInfoDO(); orderSysInfoDO = new OrderSysInfoDO();
orderSysInfoDO.setShopId(request.getShopId());
orderSysInfoDAO.insertSelective(orderSysInfoDO);
} }
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_15); ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_15);
if (request.getType().equals(OrderSysTypeEnum.ORDER_SYS_TYPE_1.getType())) { if (request.getType().equals(OrderSysTypeEnum.ORDER_SYS_TYPE_1.getType())) {
@@ -207,7 +210,8 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
nextStatus = SHOP_SUB_STAGE_STATUS_156; nextStatus = SHOP_SUB_STAGE_STATUS_156;
break; break;
default: default:
return null; nextStatus=null;
break;
} }
// //
if (AuditResultTypeEnum.REJECT.getCode().equals(request.getResultType())) { if (AuditResultTypeEnum.REJECT.getCode().equals(request.getResultType())) {
@@ -217,14 +221,16 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())) { if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())) {
//如果加盟费没有优惠阶段直接完成不用总裁审批 //如果加盟费没有优惠阶段直接完成不用总裁审批
if (StringUtils.isNull(franchiseFeeDO.getDiscountReason()) && SHOP_SUB_STAGE_STATUS_154.equals(nowStatus)) { if (StringUtils.isNull(franchiseFeeDO.getDiscountReason()) && SHOP_SUB_STAGE_STATUS_154.equals(nowStatus)) {
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), SHOP_SUB_STAGE_STATUS_156);
stageCompletion(request.getShopId()); stageCompletion(request.getShopId());
return shopStageInfoDAO.updateShopStageInfo(request.getShopId(), SHOP_SUB_STAGE_STATUS_156); return CommonConstants.ONE;
} else { } else {
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), nextStatus);
if (SHOP_SUB_STAGE_STATUS_156.equals(nextStatus)){ if (SHOP_SUB_STAGE_STATUS_156.equals(nextStatus)){
stageCompletion(request.getShopId()); stageCompletion(request.getShopId());
} }
return shopStageInfoDAO.updateShopStageInfo(request.getShopId(), nextStatus); return CommonConstants.ONE;
} }
} }
return 0; return 0;

View File

@@ -217,7 +217,7 @@ public class PreparationServiceImpl implements PreparationService {
List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null); List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null);
if (CollectionUtils.isNotEmpty(shopStageInfo)) { if (CollectionUtils.isNotEmpty(shopStageInfo)) {
Map<Integer, ShopStageInfoDO> shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data)); Map<Integer, ShopStageInfoDO> shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data));
Boolean flag3 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus(). Boolean flag3 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_156.getShopSubStageStatus().
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()).getShopSubStageStatus()); equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()).getShopSubStageStatus());
if (flag3) { if (flag3) {
List<ShopSubStageStatusEnum> list = new ArrayList<>(); List<ShopSubStageStatusEnum> list = new ArrayList<>();
@@ -239,7 +239,7 @@ public class PreparationServiceImpl implements PreparationService {
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage()).getShopSubStageStatus()); equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage()).getShopSubStageStatus());
Boolean flag2 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_43.getShopSubStageStatus(). Boolean flag2 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_43.getShopSubStageStatus().
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_4.getShopSubStage()).getShopSubStageStatus()); equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_4.getShopSubStage()).getShopSubStageStatus());
Boolean flag3 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus(). Boolean flag3 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_156.getShopSubStageStatus().
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()).getShopSubStageStatus()); equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()).getShopSubStageStatus());
//都完成了 初始化后续流程数据 //都完成了 初始化后续流程数据
@@ -312,7 +312,7 @@ public class PreparationServiceImpl implements PreparationService {
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage()).getShopSubStageStatus()); equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage()).getShopSubStageStatus());
Boolean flag2 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123.getShopSubStageStatus(). Boolean flag2 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123.getShopSubStageStatus().
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage()).getShopSubStageStatus()); equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage()).getShopSubStageStatus());
Boolean flag3 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus(). Boolean flag3 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_156.getShopSubStageStatus().
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()).getShopSubStageStatus()); equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()).getShopSubStageStatus());
Boolean flag4 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_43.getShopSubStageStatus(). Boolean flag4 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_43.getShopSubStageStatus().
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_4.getShopSubStage()).getShopSubStageStatus()); equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_4.getShopSubStage()).getShopSubStageStatus());
@@ -343,7 +343,7 @@ public class PreparationServiceImpl implements PreparationService {
Map<Integer, ShopStageInfoDO> shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data)); Map<Integer, ShopStageInfoDO> shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data));
Boolean flag2 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12.getShopSubStageStatus(). Boolean flag2 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12.getShopSubStageStatus().
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_1.getShopSubStage()).getShopSubStageStatus()); equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_1.getShopSubStage()).getShopSubStageStatus());
Boolean flag3 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus(). Boolean flag3 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_156.getShopSubStageStatus().
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()).getShopSubStageStatus()); equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()).getShopSubStageStatus());
log.info("selectSiteAndBuildStoreComplete flag2->{} flag3->{}",flag2,flag3); log.info("selectSiteAndBuildStoreComplete flag2->{} flag3->{}",flag2,flag3);
@@ -360,7 +360,7 @@ public class PreparationServiceImpl implements PreparationService {
List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null); List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null);
if (CollectionUtils.isNotEmpty(shopStageInfo)) { if (CollectionUtils.isNotEmpty(shopStageInfo)) {
Map<Integer, ShopStageInfoDO> shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data)); Map<Integer, ShopStageInfoDO> shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data));
Boolean flag3 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus(). Boolean flag3 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_156.getShopSubStageStatus().
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()).getShopSubStageStatus()); equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()).getShopSubStageStatus());
log.info("selectSiteAndBuildStoreComplete flag3->{}",flag3); log.info("selectSiteAndBuildStoreComplete flag3->{}",flag3);