This commit is contained in:
shuo.wang
2025-03-01 17:16:53 +08:00
parent 3124174b5f
commit ef12033705
9 changed files with 44 additions and 33 deletions

View File

@@ -462,13 +462,14 @@
<select id="partnerList" resultMap="BaseResultMap">
select * from xfsg_line_info a
select distinct a.id from xfsg_line_info a
join xfsg_shop_info c on a.id = c.line_id
<if test="wantShopAreaName != null">
left join xfsg_open_area_info b on a.want_shop_area_id = b.id
</if>
where a.deleted = 0 and a.line_status = 1 and a.join_status in (1,2)
<if test="userId != null and userId != ''">
and a.investment_manager = #{userId}
and (a.investment_manager = #{userId} or c.investment_manager = #{userId} )
</if>
<if test="request.joinStatus != null">
and a.join_status = #{request.joinStatus}
@@ -481,21 +482,33 @@
</if>
<if test="request.queryUserId!=null and request.queryUserId!=''">
<if test="request.queryType != null and request.queryType == 1 ">
and a.investment_manager = #{request.queryUserId}
and( a.investment_manager = #{request.queryUserId} or c.investment_manager = #{request.queryUserId})
</if>
<if test="request.queryType != null and request.queryType == 2 ">
and a.development_manager = #{request.queryUserId}
and( a.development_manager = #{request.queryUserId} or c.development_manager = #{request.queryUserId})
</if>
</if>
<if test="request.regionIds !=null and request.regionIds.size>0">
<foreach collection="request.regionIds" item="regionId" open="and a.region_id in (" close=")" separator=",">
and (
<foreach collection="request.regionIds" item="regionId" open=" a.region_id in (" close=")" separator=",">
#{regionId}
</foreach>
or
<foreach collection="request.regionIds" item="regionId" open=" c.region_id in (" close=")" separator=",">
#{regionId}
</foreach>
)
</if>
<if test="regionIds !=null and regionIds.size>0">
<foreach collection="regionIds" item="regionId" open="and a.region_id in (" close=")" separator=",">
and (
<foreach collection="regionIds" item="regionId" open=" a.region_id in (" close=")" separator=",">
#{regionId}
</foreach>
or
<foreach collection="regionIds" item="regionId" open=" c.region_id in (" close=")" separator=",">
#{regionId}
</foreach>
)
</if>
order by a.id desc
</select>

View File

@@ -346,17 +346,13 @@
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">
or region_id in
and region_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
)
</select>
@@ -389,15 +385,16 @@
</if>
</where>
</select>
<select id="selectInvestmentByList" resultType="com.cool.store.entity.ShopInfoDO">
select line_id as LineId,
investment_manager as investmentManager,
development_manager as developmentManager
<select id="selectByLines" resultType="com.cool.store.entity.ShopInfoDO">
select *
from xfsg_shop_info
where line_id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
<foreach collection="regionIds" item="item" index="index" open="and region_id in (" separator="," close=")">
#{item}
</foreach>
</select>
<update id="batchUpdate" parameterType="list">