Merge branch 'master' into cc_20250211_v2.6

This commit is contained in:
shuo.wang
2025-02-19 13:44:17 +08:00
5 changed files with 180 additions and 128 deletions

View File

@@ -33,13 +33,14 @@
<sql id="allColumn">
id
, region_id, line_id, partner_id, point_id, shop_name,
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id
</sql>
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name, store_num,supervisor_user_id,create_time,join_mode,franchise_brand,
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name,
store_num,supervisor_user_id,create_time,join_mode,franchise_brand,
development_manager,want_shop_area_id,investment_manager) values
<foreach collection="shopInfoList" item="shop" separator=",">
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName},
@@ -62,11 +63,11 @@
<select id="getStageShopCount" resultType="com.cool.store.vo.shop.StageShopCountVO">
select sum(if(shop_stage = 1, 1, 0)) as selectPointCount,
sum(if(shop_stage = 2, 1, 0)) as buildShopCount,
sum(if(shop_stage = 3, 1, 0)) as openShopCount
sum(if(shop_stage = 2, 1, 0)) as buildShopCount,
sum(if(shop_stage = 3, 1, 0)) as openShopCount
from xfsg_shop_info
where deleted = '0'
and line_id = #{lineId}
and line_id = #{lineId}
</select>
<update id="unbindPoint">
@@ -163,7 +164,7 @@
<select id="getRegionIdByid" resultType="java.lang.Long">
select r.parent_id
from xfsg_shop_info xsi
join region_${enterpriseId} r on r.id = xsi.region_id
join region_${enterpriseId} r on r.id = xsi.region_id
where xsi.id = #{shopId}
</select>
<select id="selectByStoreNum" resultType="com.cool.store.entity.ShopInfoDO">
@@ -345,32 +346,39 @@
select
<include refid="allColumn"/>
from xfsg_shop_info where line_id = #{lineId} and deleted= '0'
and ( 1=1
<if test="userId!=null and userId!=''">
or investment_manager = #{userId}
</if>
<if test="list!=null and list.size>0">
and region_id in
or region_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
#{item}
</foreach>
</if>
)
</select>
<select id="getShopPointListByDevelopmentManager" resultType="com.cool.store.dto.point.ShopPointDTO">
select
a.id as shopId,
a.point_id as pointId,
a.shop_name as shopName,
a.want_shop_area_id as wantShopAreaId,
b.user_portrait as userPortrait,
b.id as lineId,
b.username as userName,
b.mobile as mobile,
b.investment_manager as investmentManager
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
where a.deleted = 0 and a.development_manager = #{request.developmentManager} and shop_status in (0, 1) and point_id is null
<if test="request.keyword != null and request.keyword!=''">
and (b.username like concat('%', #{request.keyword}, '%') or b.mobile like concat('%', #{request.keyword}, '%'))
</if>
</select>
<select id="getShopPointListByDevelopmentManager" resultType="com.cool.store.dto.point.ShopPointDTO">
select
a.id as shopId,
a.point_id as pointId,
a.shop_name as shopName,
a.want_shop_area_id as wantShopAreaId,
b.user_portrait as userPortrait,
b.id as lineId,
b.username as userName,
b.mobile as mobile,
b.investment_manager as investmentManager
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
where a.deleted = 0 and a.development_manager = #{request.developmentManager} and shop_status in (0, 1) and
point_id is null
<if test="request.keyword != null and request.keyword!=''">
and (b.username like concat('%', #{request.keyword}, '%') or b.mobile like concat('%', #{request.keyword},
'%'))
</if>
</select>
<select id="selectAllDataOrByLineId" resultMap="BaseResultMap">