diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java index 29fe46fde..8940ec4dc 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java @@ -13,6 +13,7 @@ import com.cool.store.vo.shop.RentInfoToDoVO; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.google.common.collect.Lists; +import tk.mybatis.mapper.entity.Example; import io.swagger.models.auth.In; import org.apache.commons.collections4.CollectionUtils; import org.apache.ibatis.annotations.Param; @@ -41,10 +42,10 @@ public class ShopStageInfoDAO { * 初始化店铺阶段信息 * @param lineId * @param shopIds - * @return + * @return flag =true:表示意向加盟节点完成正常初始化。false:表示意向加盟节点未完成新建分店阶段都为未开始-100。 */ - public Integer initShopStageInfo(Long lineId, List shopIds) { - if(CollectionUtils.isEmpty(shopIds)){ + public Integer initShopStageInfo(Long lineId, List shopIds, Boolean flag) { + if (CollectionUtils.isEmpty(shopIds)) { return CommonConstants.ZERO; } List addShopStageList = new ArrayList<>(); @@ -57,9 +58,14 @@ public class ShopStageInfoDAO { ShopStageEnum shopStageEnum = shopSubStageEnum.getShopStageEnum(); shopStageInfo.setShopStage(shopStageEnum.getShopStage()); shopStageInfo.setShopSubStage(shopSubStageEnum.getShopSubStage()); - ShopSubStageStatusEnum initStatus = shopSubStageEnum.getInitStatus(); + ShopSubStageStatusEnum initStatus; + if (flag) { + initStatus = shopSubStageEnum.getInitStatus(); + } else { + initStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00; + } shopStageInfo.setShopSubStageStatus(initStatus.getShopSubStageStatus()); - shopStageInfo.setRemark(shopSubStageEnum.getShopSubStageName() + CommonConstants.PATH_BAR +shopSubStageEnum.getInitStatus().getShopSubStageStatusName()); + shopStageInfo.setRemark(shopSubStageEnum.getShopSubStageName() + CommonConstants.PATH_BAR + shopSubStageEnum.getInitStatus().getShopSubStageStatusName()); shopStageInfo.setIsTerminated(Boolean.FALSE); shopStageInfo.setPlanCompleteTime(shopSubStageEnum.getPlanCompleteTime(selectStartDate)); addShopStageList.add(shopStageInfo); @@ -69,22 +75,22 @@ public class ShopStageInfoDAO { return shopStageInfoMapper.batchInsert(addShopStageList); } - public Integer batchInsert( List addShopStageList){ - if(CollectionUtils.isEmpty(addShopStageList)){ + public Integer batchInsert(List addShopStageList) { + if (CollectionUtils.isEmpty(addShopStageList)) { return 0; } return shopStageInfoMapper.batchInsert(addShopStageList); } public Integer insertSelective(ShopStageInfoDO shopStageInfoDO) { - if(Objects.isNull(shopStageInfoDO)){ + if (Objects.isNull(shopStageInfoDO)) { return 0; } return shopStageInfoMapper.insertSelective(shopStageInfoDO); } public Integer updateByPrimaryKeySelective(ShopStageInfoDO shopStageInfoDO) { - if(Objects.isNull(shopStageInfoDO)){ + if (Objects.isNull(shopStageInfoDO)) { return 0; } return shopStageInfoMapper.updateByPrimaryKeySelective(shopStageInfoDO); @@ -92,7 +98,7 @@ public class ShopStageInfoDAO { public Integer batchUpdate(List shopStageList) { - if(CollectionUtils.isEmpty(shopStageList)){ + if (CollectionUtils.isEmpty(shopStageList)) { return 0; } return shopStageInfoMapper.batchUpdate(shopStageList); @@ -104,36 +110,38 @@ public class ShopStageInfoDAO { * @return */ public List getShopStageInfo(Long shopId, Integer shopStage) { - if(Objects.isNull(shopId)){ + if (Objects.isNull(shopId)) { return Lists.newArrayList(); } return shopStageInfoMapper.getShopStageInfo(shopId, shopStage); } public PreparationProcessVO getPreparationProcess(Long shopId) { - if(Objects.isNull(shopId)){ + if (Objects.isNull(shopId)) { return null; } return shopStageInfoMapper.getPreparationProcess(shopId); } public Integer getAllCompletionCount(Long shopId) { - if(Objects.isNull(shopId)){ + if (Objects.isNull(shopId)) { return 0; } return shopStageInfoMapper.getAllCompletionCount(shopId); } + /** * @Auther: wangshuo * @Date: 2024/5/3 * @description:更新完成时间byshopId */ - public Integer updateByShopId( ShopStageInfoDO shopStageInfoDO){ - if (Objects.isNull(shopStageInfoDO)){ + public Integer updateByShopId(ShopStageInfoDO shopStageInfoDO) { + if (Objects.isNull(shopStageInfoDO)) { return CommonConstants.ZERO; } return shopStageInfoMapper.updateByShopId(shopStageInfoDO); } + /** * 获取子阶段信息 * @param shopId @@ -141,17 +149,17 @@ public class ShopStageInfoDAO { * @return */ public ShopStageInfoDO getShopSubStageInfo(Long shopId, ShopSubStageEnum shopSubStageEnum) { - if(Objects.isNull(shopId) || Objects.isNull(shopSubStageEnum)){ + if (Objects.isNull(shopId) || Objects.isNull(shopSubStageEnum)) { return null; } return shopStageInfoMapper.getShopSubStageInfo(shopId, shopSubStageEnum.getShopSubStage()); } public Integer updateShopStageInfo(Long shopId, ShopSubStageStatusEnum shopStageInfo) { - if(Objects.isNull(shopId) || Objects.isNull(shopStageInfo)){ + if (Objects.isNull(shopId) || Objects.isNull(shopStageInfo)) { return CommonConstants.ZERO; } - String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR +shopStageInfo.getShopSubStageStatusName(); + String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR + shopStageInfo.getShopSubStageStatusName(); boolean isTerminated = shopStageInfo.isTerminated(); return shopStageInfoMapper.updateShopStageInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark); } @@ -164,7 +172,7 @@ public class ShopStageInfoDAO { * @return */ public Integer batchUpdateShopStageStatus(Long shopId, List subStageStatusList) { - if(Objects.isNull(shopId) || CollectionUtils.isEmpty(subStageStatusList)){ + if (Objects.isNull(shopId) || CollectionUtils.isEmpty(subStageStatusList)) { return CommonConstants.ZERO; } List shopStageList = Lists.newArrayList(); @@ -182,6 +190,34 @@ public class ShopStageInfoDAO { return shopStageInfoMapper.batchUpdateShopStageStatus(shopId, shopStageList); } + + /** + * 批量更新店铺状态 + * @param shopIds + * @param subStageStatusList + * @return + */ + public Integer batchUpdateByShopIdsAndSubStageStatus(List shopIds, List subStageStatusList) { + if (Objects.isNull(shopIds) || CollectionUtils.isEmpty(subStageStatusList)) { + return CommonConstants.ZERO; + } + List shopStageList = Lists.newArrayList(); + for (Long shopId : shopIds) { + for (ShopSubStageStatusEnum subStageStatus : subStageStatusList) { + String remark = subStageStatus.getShopSubStageName() + CommonConstants.PATH_BAR + subStageStatus.getShopSubStageStatusName(); + ShopStageInfoDO shopStageInfo = new ShopStageInfoDO(); + shopStageInfo.setShopId(shopId); + shopStageInfo.setShopSubStage(subStageStatus.getShopSubStageEnum().getShopSubStage()); + shopStageInfo.setShopSubStageStatus(subStageStatus.getShopSubStageStatus()); + shopStageInfo.setRemark(remark); + shopStageInfo.setIsTerminated(subStageStatus.isTerminated()); + shopStageList.add(shopStageInfo); + } + } + + return shopStageInfoMapper.batchUpdateByShopIdsAndSubStageStatus(shopIds, shopStageList); + } + /** * 更新子阶段到未开始状态 * @param shopId @@ -189,7 +225,7 @@ public class ShopStageInfoDAO { * @return */ public Integer updateShopStageToNotStarted(Long shopId, ShopSubStageEnum shopSubStageEnum) { - if(Objects.isNull(shopId) || Objects.isNull(shopSubStageEnum)){ + if (Objects.isNull(shopId) || Objects.isNull(shopSubStageEnum)) { return CommonConstants.ZERO; } return shopStageInfoMapper.updateShopStageToNotStarted(shopId, shopSubStageEnum.getShopSubStage()); @@ -202,49 +238,51 @@ public class ShopStageInfoDAO { * @return */ public Integer updateShopStageAndAuditInfo(Long shopId, ShopSubStageStatusEnum shopStageInfo, Long auditId) { - if(Objects.isNull(shopId) || Objects.isNull(shopStageInfo)){ + if (Objects.isNull(shopId) || Objects.isNull(shopStageInfo)) { return CommonConstants.ZERO; } - String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR +shopStageInfo.getShopSubStageStatusName(); + String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR + shopStageInfo.getShopSubStageStatusName(); boolean isTerminated = shopStageInfo.isTerminated(); return shopStageInfoMapper.updateShopStageAndAuditInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark, auditId); } - public Page getRentContractToDoPage(String userId, Integer pageNum, Integer pageSize){ + public Page getRentContractToDoPage(String userId, Integer pageNum, Integer pageSize) { PageHelper.startPage(pageNum, pageSize); ShopSubStageStatusEnum shopSubStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21; return shopStageInfoMapper.getRentContractToDoPage(userId, shopSubStageStatus.getShopSubStageEnum().getShopSubStage(), shopSubStageStatus.getShopSubStageStatus()); } - public List getShopIdListByStageStatus(Integer shopSubStageStatus){ - if (shopSubStageStatus == null ||shopSubStageStatus ==CommonConstants.ZERO){ + + public List getShopIdListByStageStatus(Integer shopSubStageStatus) { + if (shopSubStageStatus == null || shopSubStageStatus == CommonConstants.ZERO) { return null; } - return shopStageInfoMapper.getShopIdListByStageStatus(shopSubStageStatus); + return shopStageInfoMapper.getShopIdListByStageStatus(shopSubStageStatus); } - public List getScheduleList(List shopIdList){ - if (CollectionUtils.isEmpty(shopIdList)){ + public List getScheduleList(List shopIdList) { + if (CollectionUtils.isEmpty(shopIdList)) { return new ArrayList<>(); } return shopStageInfoMapper.getScheduleList(shopIdList); } - public List getPlatformBuildList(List shopIdList){ - if (CollectionUtils.isEmpty(shopIdList)){ + + public List getPlatformBuildList(List shopIdList) { + if (CollectionUtils.isEmpty(shopIdList)) { return Collections.emptyList(); } return shopStageInfoMapper.getPlatformBuildList(shopIdList); } - public List getShopContractActualCompletionTime(List shopIdList){ - if (CollectionUtils.isEmpty(shopIdList)){ + public List getShopContractActualCompletionTime(List shopIdList) { + if (CollectionUtils.isEmpty(shopIdList)) { return Collections.emptyList(); } return shopStageInfoMapper.getShopContractActualCompletionTime(shopIdList); } - public List getOpenActivityActualCompletionTime(List shopIdList){ - if (CollectionUtils.isEmpty(shopIdList)){ + public List getOpenActivityActualCompletionTime(List shopIdList) { + if (CollectionUtils.isEmpty(shopIdList)) { return new ArrayList<>(); } return shopStageInfoMapper.getOpenActivityActualCompletionTime(shopIdList); @@ -256,53 +294,57 @@ public class ShopStageInfoDAO { * @return */ public List getCanSubmitRentContractShopIds(List shopIds) { - if(CollectionUtils.isEmpty(shopIds)){ + if (CollectionUtils.isEmpty(shopIds)) { return Lists.newArrayList(); } return shopStageInfoMapper.getCanSubmitRentContractShopIds(shopIds); } + /** * @Auther: wangshuo * @Date: 2024/5/5 * @description:获取施工阶段未完成的店铺 */ - public List getShopContractIncompletion(){ + public List getShopContractIncompletion() { return shopStageInfoMapper.getShopContractIncompletion(); } + /** * @Auther: wangshuo * @Date: 2024/5/13 * @description:批量更新店铺某一阶段的状态 */ - public Integer batchUpdateShopStageStatus(List shopIdList,Integer shopSubStageEnum, Integer shopSubStageStatusEnum) { - if (CollectionUtils.isEmpty(shopIdList)){ + public Integer batchUpdateShopStageStatus(List shopIdList, Integer shopSubStageEnum, Integer shopSubStageStatusEnum) { + if (CollectionUtils.isEmpty(shopIdList)) { return CommonConstants.ZERO; } - return shopStageInfoMapper.batchUpdateStatus(shopIdList,shopSubStageEnum,shopSubStageStatusEnum); + return shopStageInfoMapper.batchUpdateStatus(shopIdList, shopSubStageEnum, shopSubStageStatusEnum); } public List getSpecialShopStageInfo(List shopIds, Integer shopSubStage, List shopSubStageStatusList, String investmentUserId, - List authRegionIds){ - return shopStageInfoMapper.getSpecialShopStageInfo( shopIds, shopSubStage, shopSubStageStatusList,investmentUserId,authRegionIds); + List authRegionIds) { + return shopStageInfoMapper.getSpecialShopStageInfo(shopIds, shopSubStage, shopSubStageStatusList, investmentUserId, authRegionIds); } + /** * @Auther: wangshuo * @Date: 2024/5/9 * @description:获取处于XXXX阶段的列表 */ - public List getSubStageList(List shopIds, Integer shopSubStage){ - if(CollectionUtils.isEmpty(shopIds) || shopSubStage == null){ + public List getSubStageList(List shopIds, Integer shopSubStage) { + if (CollectionUtils.isEmpty(shopIds) || shopSubStage == null) { return Collections.emptyList(); } - return shopStageInfoMapper.getSubStageList(shopIds,shopSubStage); + return shopStageInfoMapper.getSubStageList(shopIds, shopSubStage); } - public List getSubStages(List shopIds, Integer shopSubStage){ - if(CollectionUtils.isEmpty(shopIds) ){ + + public List getSubStages(List shopIds, Integer shopSubStage) { + if (CollectionUtils.isEmpty(shopIds)) { return Collections.emptyList(); } - return shopStageInfoMapper.getSubStages(shopIds,shopSubStage); + return shopStageInfoMapper.getSubStages(shopIds, shopSubStage); } /** @@ -310,28 +352,30 @@ public class ShopStageInfoDAO { * @param lineId * @return */ - public Integer getNotOpenShopCountByLineId(Long lineId){ - if(Objects.isNull(lineId)){ + public Integer getNotOpenShopCountByLineId(Long lineId) { + if (Objects.isNull(lineId)) { return CommonConstants.ZERO; } ShopSubStageEnum shopSubStageEnum = ShopSubStageEnum.SHOP_STAGE_16; return shopStageInfoMapper.getShopCountByLineIdAndStageStatus(lineId, shopSubStageEnum.getShopStageEnum().getShopStage(), shopSubStageEnum.getShopSubStage(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus()); } + /** * @Auther: wangshuo * @Date: 2024/5/11 * @description:获取处于a阶段或b阶段,和c阶段的 */ - public List getSubStageListBySubStageStatus(ShopSubStageStatusEnum a,ShopSubStageStatusEnum b, ShopSubStageStatusEnum c){ + public List getSubStageListBySubStageStatus(ShopSubStageStatusEnum a, ShopSubStageStatusEnum b, ShopSubStageStatusEnum c) { - return shopStageInfoMapper.getSubStageListBySubStageStatus(a.getShopSubStageStatus(),b.getShopSubStageStatus(),c.getShopSubStageStatus()); + return shopStageInfoMapper.getSubStageListBySubStageStatus(a.getShopSubStageStatus(), b.getShopSubStageStatus(), c.getShopSubStageStatus()); } public ShopStageInfoDO getByShopIdAndSubStage(Long shopId, Integer shopSubStage) { - return shopStageInfoMapper.getByShopIdAndSubStage(shopId,shopSubStage); + return shopStageInfoMapper.getByShopIdAndSubStage(shopId, shopSubStage); } + public List getPlatformBuildStage(List shopIds) { - if (CollectionUtils.isEmpty(shopIds)){ + if (CollectionUtils.isEmpty(shopIds)) { return new ArrayList<>(); } return shopStageInfoMapper.getPlatformBuildStage(shopIds); @@ -342,12 +386,28 @@ public class ShopStageInfoDAO { * @param shopSubStage * @return */ - public List getSubStages(Integer shopSubStage){ - return shopStageInfoMapper.getSubStageList(null,shopSubStage); + public List getSubStages(Integer shopSubStage) { + return shopStageInfoMapper.getSubStageList(null, shopSubStage); } + //获取新店筹备总阶段总数排除发票回传,flag=0查询全部 =1 查询已完成 - public Integer allNumber(Long shopId,Integer flag){ - return shopStageInfoMapper.getAllNumber(shopId,flag); + public Integer allNumber(Long shopId, Integer flag) { + return shopStageInfoMapper.getAllNumber(shopId, flag); + } + + /** + * @Auther: wangshuo + * @Date: 2025/1/15 + * @description:批量获取线索下门店的选址未开始的数据 + */ + public List getByLineIdAndSubStage(Long lineId) { + if (lineId == null) { + return new ArrayList<>(); + } + Example example = new Example(ShopStageInfoDO.class); + example.createCriteria().andEqualTo("lineId", lineId).andEqualTo("shopSubStage", ShopSubStageEnum.SHOP_STAGE_1.getShopSubStage()) + .andEqualTo("shopSubStageStatus", ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus()); + return shopStageInfoMapper.selectByExample(example); } } diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java index 4a361fad3..a553e32c9 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java @@ -65,6 +65,7 @@ public interface ShopStageInfoMapper extends Mapper { * @return */ Integer batchUpdateShopStageStatus(@Param("shopId") Long shopId, @Param("updateList") List updateList); + Integer batchUpdateByShopIdsAndSubStageStatus(@Param("shopIds") List shopIds, @Param("updateList") List updateList); /** * 更新阶段及审核信息 diff --git a/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml index 07d496a28..c82482963 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml @@ -1,367 +1,391 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - id, line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status, is_terminated, plan_complete_time, actual_complete_time, remark, audit_id, deleted, create_time, update_time - + + id, line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status, is_terminated, plan_complete_time, + actual_complete_time, remark, audit_id, deleted, create_time, update_time + - - - INSERT INTO xfsg_shop_stage_info(line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status, is_terminated, plan_complete_time, remark) - VALUES(#{shop.lineId}, #{shop.shopId}, #{shop.shopStage}, #{shop.shopSubStage}, #{shop.shopSubStageStatus}, #{shop.isTerminated}, #{shop.planCompleteTime}, #{shop.remark}) - - + + + INSERT INTO xfsg_shop_stage_info(line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status, + is_terminated, plan_complete_time, remark) + VALUES(#{shop.lineId}, #{shop.shopId}, #{shop.shopStage}, #{shop.shopSubStage}, #{shop.shopSubStageStatus}, + #{shop.isTerminated}, #{shop.planCompleteTime}, #{shop.remark}) + + - - update xfsg_shop_stage_info - - shop_sub_stage_status = CASE id - - WHEN #{item.id} THEN IFNULL(#{item.shopSubStageStatus},shop_sub_stage_status) - - END - - where id in ( - - #{item.id} - - ) - + + update xfsg_shop_stage_info + + shop_sub_stage_status = CASE id + + WHEN #{item.id} THEN IFNULL(#{item.shopSubStageStatus},shop_sub_stage_status) + + END + + where id in ( + + #{item.id} + + ) + - - - - - - - - update - xfsg_shop_stage_info - set - shop_sub_stage_status = #{shopSubStageStatus}, - is_terminated = #{isTerminated}, - remark = #{remark}, - actual_complete_time = if(is_terminated, now(), null) - where - shop_id = #{shopId} and shop_sub_stage = #{shopSubStage} - - - - - - update + + + + + + + + update + xfsg_shop_stage_info + set + shop_sub_stage_status = #{shopSubStageStatus}, + is_terminated = #{isTerminated}, + remark = #{remark}, actual_complete_time = if(is_terminated, now(), null) - where - shop_id = #{shopId} and shop_sub_stage = #{update.shopSubStage} - - - - - - - update - xfsg_shop_stage_info - set - shop_sub_stage_status = #{shopSubStageStatus}, - is_terminated = #{isTerminated}, - remark = #{remark}, - actual_complete_time = if(is_terminated, now(), null), - audit_id = #{auditId} - where - shop_id = #{shopId} and shop_sub_stage = #{shopSubStage} - - - - update - xfsg_shop_stage_info - set - shop_sub_stage_status = -100, - is_terminated = 0, - remark = '未开始', - actual_complete_time = null, - audit_id = null - where - shop_id = #{shopId} and shop_sub_stage = #{shopSubStage} - - - update xfsg_shop_stage_info - - - plan_complete_time = #{shopStageInfoDO.planCompleteTime}, - - - actual_complete_time = #{shopStageInfoDO.actualCompleteTime}, - - - where shop_id = #{shopStageInfoDO.shopId} AND shop_sub_stage = #{shopStageInfoDO.shopSubStage} - - - - update xfsg_shop_stage_info - - - - shop_sub_stage_status = #{shopSubStageStatusEnum} - - - where shop_id in - - #{shopId} - - - and shop_sub_stage = #{shopSubStageEnum} - - - - + where + shop_id = #{shopId} and shop_sub_stage = #{shopSubStage} + - + + + update + xfsg_shop_stage_info + set + shop_sub_stage_status = #{update.shopSubStageStatus}, + is_terminated = #{update.isTerminated}, + remark = #{update.remark}, + actual_complete_time = if(is_terminated, now(), null) + where + shop_id = #{shopId} and shop_sub_stage = #{update.shopSubStage} + + + + + + + update + xfsg_shop_stage_info + set + shop_sub_stage_status = #{shopSubStageStatus}, + is_terminated = #{isTerminated}, + remark = #{remark}, + actual_complete_time = if(is_terminated, now(), null), + audit_id = #{auditId} + where + shop_id = #{shopId} and shop_sub_stage = #{shopSubStage} + + + + update + xfsg_shop_stage_info + set + shop_sub_stage_status = -100, + is_terminated = 0, + remark = '未开始', + actual_complete_time = null, + audit_id = null + where + shop_id = #{shopId} and shop_sub_stage = #{shopSubStage} + + + update xfsg_shop_stage_info + + + plan_complete_time = #{shopStageInfoDO.planCompleteTime}, + + + actual_complete_time = #{shopStageInfoDO.actualCompleteTime}, + + + where shop_id = #{shopStageInfoDO.shopId} AND shop_sub_stage = #{shopStageInfoDO.shopSubStage} + + + + update xfsg_shop_stage_info + + + + shop_sub_stage_status = #{shopSubStageStatusEnum} + + + where shop_id in + + #{shopId} + + + and shop_sub_stage = #{shopSubStageEnum} + + + + + update + xfsg_shop_stage_info + set + shop_sub_stage_status = #{update.shopSubStageStatus}, + is_terminated = #{update.isTerminated}, + remark = #{update.remark}, + actual_complete_time = if(is_terminated, now(), null) + where + shop_id in + + #{shopId} + + and shop_sub_stage = #{update.shopSubStage} + + + + - - - - + - + select + * + from xfsg_shop_stage_info where shop_stage = 1 and shop_sub_stage = 20 and actual_complete_time is not null + + and shop_id in + + #{shopId} + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + +