1.3期 列表+全量私海
This commit is contained in:
@@ -261,13 +261,47 @@
|
||||
b.id as id,
|
||||
b.create_time as partnerSubmitTime,
|
||||
b.deadline as deadline,
|
||||
bi.user_portrait as userPortrait,
|
||||
hpuinfo.mobile as mobile,
|
||||
hpuinfo.username as partnerUserName,
|
||||
hpuinfo.user_channel_id as userChannelId,
|
||||
hpuinfo.live_area as liveArea,
|
||||
hpuinfo.want_shop_area as wantShopArea,
|
||||
hpuinfo.accept_adjust_type as acceptAdjustType
|
||||
hpuinfo.accept_adjust_type as acceptAdjustType,
|
||||
cr.create_time as lastFollowTime,
|
||||
cr.call_status as callStatus
|
||||
from hy_partner_line_info a
|
||||
left join hy_partner_intent_info b on a.id = b.partner_line_id
|
||||
left join hy_partner_base_info bi on a.id = bi.partner_line_id
|
||||
LEFT JOIN hy_partner_user_info hpuinfo ON a.partner_id = hpuinfo.partner_id
|
||||
LEFT join call_record cr on a.id = cr.partner_line_id
|
||||
where deleted = 0 and line_status!=3
|
||||
and (cr.id in (
|
||||
select max(id) maxId
|
||||
from call_record group by partner_line_id) or cr.id is null)
|
||||
<if test="keyword!=null and keyword!=''">
|
||||
and (hpuinfo.mobile like concat('%',#{keyword},'%') or hpuinfo.username like concat('%',#{keyword},'%'))
|
||||
</if>
|
||||
<if test="callStatus!=null and callStatus==1">
|
||||
and cr.call_status = #{callStatus}
|
||||
</if>
|
||||
<if test="callStatus!=null and callStatus==0">
|
||||
and cr.call_status != 1
|
||||
</if>
|
||||
<if test="lastFollowStartTime!=null and lastFollowEndTime!=null">
|
||||
and cr.create_time>#{lastFollowStartTime} and cr.create_time <![CDATA[<]]> #{lastFollowEndTime}
|
||||
</if>
|
||||
<if test="userChannelIdList!=null and userChannelIdList.size>0">
|
||||
<foreach collection="userChannelIdList" open="and hpuinfo.user_channel_id in (" close=")" separator="," item="userChannelId">
|
||||
#{userChannelId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userPortraitIdList!=null and userPortraitIdList.size>0">
|
||||
and
|
||||
<foreach collection="userPortraitIdList" separator="or" open="(" close=")" item="userPortraitId">
|
||||
bi.user_portrait like concat("%,", #{userPortraitId}, ",%")
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userId!=null and userId!=''">
|
||||
and a.investment_manager = #{userId}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user