数据处理代码+同步加盟商
This commit is contained in:
@@ -195,4 +195,10 @@ public class RegionDao {
|
||||
}
|
||||
return regionMapper.getSubRegionByParentIdAndRegionType(regionId, regionType);
|
||||
}
|
||||
public List<RegionDO> getRegionByNameListAndIsPath (List<String> name){
|
||||
if (CollectionUtils.isEmpty(name)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return regionMapper.getRegionByNameListAndIsPath(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dto.FranchiseReportDTO;
|
||||
import com.cool.store.dto.IsCreateStoreDTO;
|
||||
import com.cool.store.dto.LicenseSyncDTO;
|
||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
@@ -307,4 +308,30 @@ public class ShopInfoDAO {
|
||||
example.createCriteria().andEqualTo("lineId", lineId).andIn("shopStatus", shopStatus).andEqualTo("deleted", false);
|
||||
return shopInfoMapper.selectByExample(example);
|
||||
}
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/11
|
||||
* @description:查询建店资料完成并且已经在标品已经建店是门店
|
||||
*/
|
||||
public List<IsCreateStoreDTO> selectIsCreateStore(){
|
||||
return shopInfoMapper.selectIsCreateStore();
|
||||
}
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/11
|
||||
* @description: 查询未建店
|
||||
*/
|
||||
public List<ShopInfoDO> selectByNotCreateStore(List<Long> isCreateShopIds){
|
||||
Example example = new Example(ShopInfoDO.class);
|
||||
example.createCriteria().
|
||||
andNotIn("id", isCreateShopIds).andNotEqualTo("shopStatus", 2).andEqualTo("deleted", false)
|
||||
.andNotEqualTo("region_id",459);
|
||||
return shopInfoMapper.selectByExample(example);
|
||||
}
|
||||
public Integer updateManagerRegionId(List<ShopInfoDO> shopList){
|
||||
if (CollectionUtils.isEmpty(shopList)){
|
||||
return 0;
|
||||
}
|
||||
return shopInfoMapper.updateManagerRegionId(shopList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,4 +113,6 @@ public interface RegionMapper {
|
||||
RegionDO getRegionInfoBySynDingDeptId(@Param("synDingDeptId") Long synDingDeptId);
|
||||
|
||||
List<RegionResponse> getSubRegionByParentIdAndRegionType( @Param("regionId")Long regionId, @Param("regionType")String regionType);
|
||||
|
||||
List<RegionDO> getRegionByNameListAndIsPath(@Param("regionNameList") List<String> regionNameList);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.FranchiseReportDTO;
|
||||
import com.cool.store.dto.IsCreateStoreDTO;
|
||||
import com.cool.store.dto.LicenseSyncDTO;
|
||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
@@ -142,4 +143,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
Integer updateShopCity(@Param("list") List<ShopInfoDO> list);
|
||||
|
||||
List<FranchiseReportDTO> getShopFranchiseReportList(@Param("request") FranchiseReportRequest request);
|
||||
|
||||
List<IsCreateStoreDTO> selectIsCreateStore();
|
||||
Integer updateManagerRegionId(@Param("list") List<ShopInfoDO> shopList);
|
||||
}
|
||||
|
||||
@@ -428,6 +428,17 @@
|
||||
and parent_id = #{regionId}
|
||||
and region_type = #{regionType}
|
||||
</select>
|
||||
<select id="getRegionByNameListAndIsPath" resultType="com.cool.store.entity.RegionDO">
|
||||
select <include refid="fields"/>
|
||||
from region_${enterpriseId}
|
||||
where deleted = 0
|
||||
<if test="regionNameList != null and regionNameList.size() >0">
|
||||
and name in (
|
||||
<foreach collection="regionNameList" separator="," item="region">#{region}</foreach>
|
||||
)
|
||||
</if>
|
||||
and region_type = 'path'
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -543,13 +543,20 @@
|
||||
and xsi.shop_name Like concat("%",#{keyWord},"%") or xsi.store_num Like concat("%",#{keyWord},"%")
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectIsCreateStore" resultType="com.cool.store.entity.ShopInfoDO">
|
||||
SELECT a.`shop_name` ,a.`shop_code` ,b.*
|
||||
<select id="selectIsCreateStore" resultType="com.cool.store.dto.IsCreateStoreDTO">
|
||||
|
||||
SELECT a.id as shopId, c.parent_id as `pid`
|
||||
FROM xfsg_shop_info a
|
||||
LEFT JOIN store_214ac5a3a517472a87268e02a2e6410a b ON a.shop_code = b.store_num
|
||||
LEFT JOIN xfsg_shop_stage_info c ON c.shop_id = a.id
|
||||
WHERE b.store_num is not null and a.shop_code is not null and a.deleted =0 and a.shop_status != 2 and a.shop_code != '' and c.shop_sub_stage_status in (1560)
|
||||
|
||||
LEFT JOIN `region_214ac5a3a517472a87268e02a2e6410a` c on b.region_id = c.`id`
|
||||
WHERE b.store_num is not null
|
||||
and a.shop_code is not null
|
||||
and a.deleted =0
|
||||
and a.shop_status != 2
|
||||
and a.shop_code != ""
|
||||
and c.deleted = 0
|
||||
and b.is_delete = 'effective'
|
||||
and a.region_id != 459
|
||||
</select>
|
||||
|
||||
<update id="batchUpdate" parameterType="list">
|
||||
@@ -573,4 +580,9 @@
|
||||
update xfsg_shop_info set shop_name = #{item.shopName}, province =#{item.province}, city = #{item.city}, district=#{item.district}, detail_address = #{item.detailAddress} where id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateManagerRegionId">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
update xfsg_shop_info set manager_region_id = #{item.managerRegionId} where id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user