fix
This commit is contained in:
@@ -18,6 +18,7 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -169,4 +170,8 @@ public class ShopAccountDAO {
|
||||
}
|
||||
return shopAccountMapper.updateStatusDataHandle(shopIds);
|
||||
}
|
||||
public List<Long> getShopId(){
|
||||
List<ShopAccountDO> shopAccountDOS = shopAccountMapper.selectAll();
|
||||
return new ArrayList<>(shopAccountDOS.stream().map(ShopAccountDO::getShopId).collect(Collectors.toSet())) ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -918,31 +918,34 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.getByLineIds(new ArrayList<>(lineIds));
|
||||
Map<Long, LineInfoDO> lineMap = lineInfoDOS.stream().collect(Collectors.toMap(LineInfoDO::getId, line -> line));
|
||||
List<ShopStageInfoDO> initList = new ArrayList<>();
|
||||
List<ShopAccountDO> initAccountList = new ArrayList<>();
|
||||
List<ShopAccountDO> initAccountList = new ArrayList<>();
|
||||
ShopSubStageEnum shopSubStageEnum = ShopSubStageEnum.SHOP_STAGE_25;
|
||||
for (ShopStageInfoDO shopStageInfoDO : subStages){
|
||||
List<Long> shopIds = shopAccountDAO.getShopId();
|
||||
for (ShopStageInfoDO shopStageInfoDO : subStages) {
|
||||
LineInfoDO lineInfoDO = lineMap.get(shopStageInfoDO.getLineId());
|
||||
if (Objects.isNull(lineInfoDO)){
|
||||
log.info("线索不存在:{}", shopStageInfoDO.getShopId());
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
log.info("线索不存在:{}", shopStageInfoDO.getShopId());
|
||||
continue;
|
||||
}
|
||||
if (shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())){
|
||||
if (shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
ShopStageInfoDO shopStageInfo = getShopStageInfoDO(shopSubStageEnum, shopStageInfoDO, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00);
|
||||
initList.add(shopStageInfo);
|
||||
}
|
||||
if ( !shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())){
|
||||
if (!shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
ShopStageInfoDO shopStageInfo = getShopStageInfoDO(shopSubStageEnum, shopStageInfoDO, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_250);
|
||||
initList.add(shopStageInfo);
|
||||
}
|
||||
ShopAccountDO shopAccountDO = new ShopAccountDO();
|
||||
shopAccountDO.setShopId(shopStageInfoDO.getShopId());
|
||||
shopAccountDO.setSystemName(ShopAccountEnum.JINGDONG.getSystemName());
|
||||
shopAccountDO.setBoundPhone(lineInfoDO.getMobile());
|
||||
shopAccountDO.setStatus(ShopAccountEnum.JINGDONG.getInitStatus().getCode());
|
||||
initAccountList.add(shopAccountDO);
|
||||
if (shopIds.contains(shopStageInfoDO.getShopId())) {
|
||||
ShopAccountDO shopAccountDO = new ShopAccountDO();
|
||||
shopAccountDO.setShopId(shopStageInfoDO.getShopId());
|
||||
shopAccountDO.setSystemName(ShopAccountEnum.JINGDONG.getSystemName());
|
||||
shopAccountDO.setBoundPhone(lineInfoDO.getMobile());
|
||||
shopAccountDO.setStatus(ShopAccountEnum.JINGDONG.getInitStatus().getCode());
|
||||
initAccountList.add(shopAccountDO);
|
||||
}
|
||||
}
|
||||
shopAccountDAO.batchInsert(initAccountList);
|
||||
return shopStageInfoDAO.batchInsert(initList) ;
|
||||
return shopStageInfoDAO.batchInsert(initList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user