查询sql修复

This commit is contained in:
陈伏伽
2023-10-19 17:49:06 +08:00
parent ac68c59ab4
commit 07d22ae3d0

View File

@@ -565,9 +565,15 @@
<if test="lineStartTime != null and lineEndTime != null">
AND hpli.create_time BETWEEN #{lineStartTime} and #{lineEndTime}
</if>
<if test="intentAreaName!=null and intentAreaName!=''">
<if test="intentAreaName!=null and intentAreaName!='' and intentAreaQueryType!=null and intentAreaQueryType='contains'">
and hoai.area_path like concat('%/',#{intentAreaName},'/%')
</if>
<if test="intentAreaName!=null and intentAreaName!='' and intentAreaQueryType!=null and intentAreaQueryType='notContains'">
and hoai.area_path like concat('%/',#{intentAreaName},'/%')
</if>
<if test="intentAreaQueryType !=null and intentAreaQueryType='blank'">
AND hoai.area_path is null
</if>
<if test="acceptAdjustType!=null">
AND hpuinfo.accept_adjust_type = #{acceptAdjustType}
</if>
@@ -580,12 +586,6 @@
<if test="investmentManagerId !=null and investmentManagerId!=''">
AND hpli.investment_manager = #{investmentManagerId}
</if>
<if test="intentAreaId != null and intentAreaId !='' and intentAreaQueryType!=null and intentAreaQueryType='contains'">
AND hpuinfo.want_shop_area = #{intentAreaId}
</if>
<if test="intentAreaId != null and intentAreaId !='' and intentAreaQueryType!=null and intentAreaQueryType='notContains'">
AND hpuinfo.want_shop_area != #{intentAreaId}
</if>
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='storeCode'">
AND hpuinfo.shop_code like concat('%',#{storeKeyword},'%')
</if>
@@ -604,15 +604,19 @@
</foreach>
</if>
<if test="userPortraitIdList!=null and userPortraitIdList.size>0 and userPortraitQueryType!=null and userPortraitQueryType='contains'">
<foreach collection="userPortraitIdList" open="and bi.user_portrait in (" close=")" separator="," item="userPortraitId">
#{userPortraitId}
<foreach collection="userPortraitIdList" separator="or" open="and (" close=")" item="userPortraitId">
bi.user_portrait like concat("%,", #{userPortraitId}, ",%")
</foreach>
</if>
<if test="userPortraitIdList!=null and userPortraitIdList.size>0 and userPortraitQueryType!=null and userPortraitQueryType='notContains'">
<foreach collection="userPortraitIdList" open="and bi.user_portrait not in (" close=")" separator="," item="userPortraitId">
#{userPortraitId}
<foreach collection="userPortraitIdList" separator="or" open="and (" close=")" item="userPortraitId">
bi.user_portrait not like concat("%,", #{userPortraitId}, ",%")
</foreach>
</if>
<if test="userPortraitQueryType!=null and userPortraitQueryType='blank'">
bi.user_portrait is null
</if>
<if test="userChannelIdList!=null and userChannelIdList.size>0 and userChannelQueryType!=null and userChannelQueryType='contains' ">
<foreach collection="userChannelIdList" open="and hpuinfo.user_channel_id in (" close=")" separator="," item="userChannelId">
#{userChannelId}
@@ -623,6 +627,9 @@
#{userChannelId}
</foreach>
</if>
<if test="userChannelQueryType!=null and userChannelQueryType='blank' ">
hpuinfo.user_channel_id is null
</if>
<if test="userIdList!=null and userIdList.size==0 and developmentManagerList!=null and developmentManagerList.size>0">
<foreach collection="developmentManagerList" item="developmentManager" open="and hpli.development_manager in (" close=")" separator=",">
#{developmentManager}