修改运营方案列表bug

This commit is contained in:
shuo.wang
2024-05-08 15:05:19 +08:00
parent a7f3ef74ba
commit 3b258cd364
7 changed files with 72 additions and 62 deletions

View File

@@ -46,32 +46,33 @@
</select>
<select id="getOpenPlanShopListByCondition"
resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO">
select si.id as shopId, si.region_id AS regionId,si.line_id as lineId, si.shop_name as shopName,
si.store_num as storeNum, si.shop_manager_user_id as shopManagerUserId,li.investment_manager AS investmentManagerId,
li.username as partnerName, li.mobile as mobile ,
op.submission_time AS submissionTime , op.result_type AS resultType
from xfsg_opening_operation_plan op
join xfsg_shop_info si on si.id = op.shop_id
join xfsg_line_info li on si.line_id = li.id
where 1=1
<if test="request.shopName != null and request.shopName != '' ">
AND si.shop_name like concat('%', #{request.shopName}, '%')
</if>
<if test="request.resultType != null and request.resultType != ''">
AND op.result_type = #{request.resultType}
</if>
<if test="request.planStartDate != null and request.planStartDate != ''">
and op.create_time >= #{request.planStartDate}
</if>
<if test="request.planEndDate != null and request.planEndDate != ''">
AND op.create_time &lt;= #{request.planEndDate}
</if>
<if test="request.regionIds != null and request.regionIds.size() > 0">
and si.region_id in
<foreach collection="request.regionIds" item="regionId" index="index" open="(" separator="," close=")">
#{regionId}
</foreach>
</if>
select si.id as shopId, si.region_id AS regionId,si.line_id as lineId, si.shop_name as shopName,
si.store_num as storeNum, si.shop_manager_user_id as shopManagerUserId,op.submission_time AS submissionTime ,
op.result_type AS resultType
from xfsg_opening_operation_plan op
join xfsg_shop_info si on si.id = op.shop_id
where 1=1
<if test="request.shopName != null and request.shopName != '' ">
AND si.shop_name like concat('%', #{request.shopName}, '%')
</if>
<if test="request.resultType != null and request.resultType != ''">
AND op.result_type = #{request.resultType}
</if>
<if test="request.planStartDate == null and request.planEndDate == null">
and op.create_time >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
</if>
<if test="request.planStartDate != null">
and op.create_time >= #{request.planStartDate}
</if>
<if test="request.planEndDate != null">
AND op.create_time &lt;= #{request.planEndDate}
</if>
<if test="request.regionIds != null and request.regionIds.size() > 0">
and si.region_id in
<foreach collection="request.regionIds" item="regionId" index="index" open="(" separator="," close=")">
#{regionId}
</foreach>
</if>
</select>