Merge remote-tracking branch 'origin/cc_20250106_v2.4' into cc_20250106_v2.4
This commit is contained in:
@@ -162,8 +162,8 @@ public class ShopInfoDAO {
|
||||
return shopInfoMapper.ListByCondition(request);
|
||||
}
|
||||
|
||||
public List<PreparationDTO> ListByBranchShopRequest(BranchShopRequest request){
|
||||
return shopInfoMapper.ListByBranchShopRequest(request);
|
||||
public List<PreparationDTO> ListByBranchShopRequest(BranchShopRequest request,String userId){
|
||||
return shopInfoMapper.ListByBranchShopRequest(request,userId);
|
||||
}
|
||||
public Long getRegionIdByid(Long shopId){
|
||||
return shopInfoMapper.getRegionIdByid(shopId);
|
||||
|
||||
@@ -174,16 +174,7 @@ public class ShopStageInfoDAO {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
List<ShopStageInfoDO> shopStageList = Lists.newArrayList();
|
||||
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);
|
||||
}
|
||||
extracted(subStageStatusList, shopId, shopStageList);
|
||||
|
||||
return shopStageInfoMapper.batchUpdateShopStageStatus(shopId, shopStageList);
|
||||
}
|
||||
@@ -196,26 +187,30 @@ public class ShopStageInfoDAO {
|
||||
* @return
|
||||
*/
|
||||
public Integer batchUpdateByShopIdsAndSubStageStatus(List<Long> shopIds, List<ShopSubStageStatusEnum> subStageStatusList) {
|
||||
if (Objects.isNull(shopIds) || CollectionUtils.isEmpty(subStageStatusList)) {
|
||||
if (CollectionUtils.isEmpty(shopIds) || CollectionUtils.isEmpty(subStageStatusList)) {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
List<ShopStageInfoDO> 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);
|
||||
}
|
||||
extracted(subStageStatusList, shopId, shopStageList);
|
||||
}
|
||||
|
||||
return shopStageInfoMapper.batchUpdateByShopIdsAndSubStageStatus(shopIds, shopStageList);
|
||||
}
|
||||
|
||||
private static void extracted(List<ShopSubStageStatusEnum> subStageStatusList, Long shopId, List<ShopStageInfoDO> shopStageList) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新子阶段到未开始状态
|
||||
* @param shopId
|
||||
|
||||
@@ -86,7 +86,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
|
||||
List<PreparationDTO> ListByCondition(@Param("request") PreparationRequest request);
|
||||
|
||||
List<PreparationDTO> ListByBranchShopRequest(@Param("request") BranchShopRequest request);
|
||||
List<PreparationDTO> ListByBranchShopRequest(@Param("request") BranchShopRequest request,@Param("userId") String userId);
|
||||
|
||||
Long getRegionIdByid(@Param("shopId") Long shopId);
|
||||
|
||||
|
||||
@@ -294,12 +294,6 @@
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.authRegionIds != null and request.authRegionIds.size() > 0">
|
||||
and a.region_id in
|
||||
<foreach collection="request.authRegionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.investmentManagerUserId != null and request.investmentManagerUserId != ''">
|
||||
and a.investment_manager = #{request.investmentManagerUserId}
|
||||
</if>
|
||||
@@ -334,6 +328,15 @@
|
||||
#{wantShopAreaId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.flag == 1">
|
||||
and a.investment_manager = #{userId}
|
||||
</if>
|
||||
<if test="request.authRegionIds != null and request.authRegionIds.size() > 0">
|
||||
and a.region_id in
|
||||
<foreach collection="request.authRegionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
order by a.update_time desc
|
||||
</select>
|
||||
<select id="getShopListByRegion" resultType="com.cool.store.entity.ShopInfoDO">
|
||||
|
||||
Reference in New Issue
Block a user