fix:三明治不初始化营帐通开通阶段
This commit is contained in:
@@ -4,7 +4,9 @@ import com.cool.store.constants.CommonConstants;
|
|||||||
import com.cool.store.dto.BuildStageDTO;
|
import com.cool.store.dto.BuildStageDTO;
|
||||||
import com.cool.store.dto.PlatformBuildStageDTO;
|
import com.cool.store.dto.PlatformBuildStageDTO;
|
||||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||||
|
import com.cool.store.entity.ShopInfoDO;
|
||||||
import com.cool.store.entity.ShopStageInfoDO;
|
import com.cool.store.entity.ShopStageInfoDO;
|
||||||
|
import com.cool.store.enums.FranchiseBrandEnum;
|
||||||
import com.cool.store.enums.point.ShopStageEnum;
|
import com.cool.store.enums.point.ShopStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
@@ -40,17 +42,22 @@ public class ShopStageInfoDAO {
|
|||||||
/**
|
/**
|
||||||
* 初始化店铺阶段信息
|
* 初始化店铺阶段信息
|
||||||
* @param lineId
|
* @param lineId
|
||||||
* @param shopIds
|
* @param shopInfoList
|
||||||
* @return flag =true:表示意向加盟节点完成正常初始化。false:表示意向加盟节点未完成新建分店阶段都为未开始-100。
|
* @return flag =true:表示意向加盟节点完成正常初始化。false:表示意向加盟节点未完成新建分店阶段都为未开始-100。
|
||||||
*/
|
*/
|
||||||
public Integer initShopStageInfo(Long lineId, List<Long> shopIds, Boolean flag) {
|
public Integer initShopStageInfo(Long lineId, List<ShopInfoDO> shopInfoList, Boolean flag) {
|
||||||
if (CollectionUtils.isEmpty(shopIds)) {
|
if (CollectionUtils.isEmpty(shopInfoList)) {
|
||||||
return CommonConstants.ZERO;
|
return CommonConstants.ZERO;
|
||||||
}
|
}
|
||||||
List<ShopStageInfoDO> addShopStageList = new ArrayList<>();
|
List<ShopStageInfoDO> addShopStageList = new ArrayList<>();
|
||||||
LocalDate selectStartDate = LocalDate.now();
|
LocalDate selectStartDate = LocalDate.now();
|
||||||
for (Long shopId : shopIds) {
|
for (ShopInfoDO shopInfoDO : shopInfoList) {
|
||||||
|
Long shopId = shopInfoDO.getId();
|
||||||
for (ShopSubStageEnum shopSubStageEnum : ShopSubStageEnum.values()) {
|
for (ShopSubStageEnum shopSubStageEnum : ShopSubStageEnum.values()) {
|
||||||
|
if (ShopSubStageEnum.SHOP_STAGE_24.equals(shopSubStageEnum) && String.valueOf(FranchiseBrandEnum.ZXSMZ).equals(shopInfoDO.getFranchiseBrand())) {
|
||||||
|
// 三明治跳过营帐通开通
|
||||||
|
continue;
|
||||||
|
}
|
||||||
ShopStageInfoDO shopStageInfo = new ShopStageInfoDO();
|
ShopStageInfoDO shopStageInfo = new ShopStageInfoDO();
|
||||||
shopStageInfo.setLineId(lineId);
|
shopStageInfo.setLineId(lineId);
|
||||||
shopStageInfo.setShopId(shopId);
|
shopStageInfo.setShopId(shopId);
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
}
|
}
|
||||||
shopInfoDAO.batchAddShop(addShopList);
|
shopInfoDAO.batchAddShop(addShopList);
|
||||||
List<Long> shopIds = addShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
List<Long> shopIds = addShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||||
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds, true);
|
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), addShopList, true);
|
||||||
//初始化平台账号
|
//初始化平台账号
|
||||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
|
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
|
||||||
shopAccountDAO.initShopAccount(hyPartnerUserInfoDO, shopIds);
|
shopAccountDAO.initShopAccount(hyPartnerUserInfoDO, shopIds);
|
||||||
@@ -298,7 +298,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
}
|
}
|
||||||
shopInfoDAO.batchAddShop(addShopList);
|
shopInfoDAO.batchAddShop(addShopList);
|
||||||
List<Long> shopIds = addShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
List<Long> shopIds = addShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||||
shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds, true);
|
shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), addShopList, true);
|
||||||
return 1L;
|
return 1L;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,7 +356,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
shopInfoDO.setCreateUserId(userId);
|
shopInfoDO.setCreateUserId(userId);
|
||||||
Long shopId = shopInfoDAO.addShopInfo(shopInfoDO);
|
Long shopId = shopInfoDAO.addShopInfo(shopInfoDO);
|
||||||
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode())) {
|
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode())) {
|
||||||
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopId), true);
|
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopInfoDO), true);
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
map.put("partnerUsername", lineInfo.getUsername());
|
map.put("partnerUsername", lineInfo.getUsername());
|
||||||
map.put("partnerMobile", lineInfo.getMobile());
|
map.put("partnerMobile", lineInfo.getMobile());
|
||||||
@@ -381,7 +381,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
MessageEnum.MESSAGE_21,
|
MessageEnum.MESSAGE_21,
|
||||||
map);
|
map);
|
||||||
} else {
|
} else {
|
||||||
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopId), false);
|
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopInfoDO), false);
|
||||||
}
|
}
|
||||||
//初始化平台账号
|
//初始化平台账号
|
||||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
|
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
|
||||||
|
|||||||
Reference in New Issue
Block a user