私海列表

This commit is contained in:
苏竹红
2023-06-16 10:09:44 +08:00
parent 0ad84af01f
commit a6a6093dd9
11 changed files with 282 additions and 36 deletions

View File

@@ -357,8 +357,11 @@
from hy_partner_line_info a inner join hy_partner_user_info b where a.partner_id = b.partner_id
where deleted = 0
and line_status = 3
<if test="keyWord!=null and keyWord !=''">
and (b.username like concat('%', #{keyWord}, '%') or b.mobile like concat('%', #{keyWord}, '%'))
<if test="userNameKeyword!=null and userNameKeyword !=''">
and b.username like concat('%', #{userNameKeyword}, '%')
</if>
<if test="phoneKeyword!=null and phoneKeyword !=''">
and b.mobile like concat('%', #{phoneKeyword}, '%')
</if>
<if test="intentArea!=null and intentArea!=''">
and b.want_shop_area = #{intentArea}
@@ -391,4 +394,60 @@
where partner_id = #{partnerId}
</select>
<select id="getPublicSeaLineList" resultType="com.cool.store.dto.partner.PublicSeaLineDTO">
select
a.create_time as createTime,
b.partner_id as partner_id,
b.mobile as mobile,
b.username as userName,
b.want_shop_area as wantShopArea,
b.accept_adjust_type as acceptAdjustType
FROM hy_partner_line_info a inner JOIN hy_partner_user_info b on a.partner_id = b.partner_id
where a.line_status = 1
<if test="userNameKeyword!=null and userNameKeyword!=''">
and b.username like concat('%',#{userNameKeyword},'%')
</if>
<if test="phoneKeyword!=null and phoneKeyword!=''">
and b.mobile like concat('%',#{phoneKeyword},'%')
</if>
<if test="intentArea!=null and intentArea!=''">
and b.want_shop_area = #{intentArea}
</if>
<if test="acceptAdjustType!=null">
and b.accept_adjust_type = #{acceptAdjustType}
</if>
<if test="updateStartTime!=null and updateEndTime!=''">
and a.update_time BETWEEN #{updateStartTime} and #{updateEndTime}
</if>
<if test="userIdList!=null and userIdList.size>0">
<foreach collection="userIdList" item="userId" open="and a.investment_manager in (" close=")" separator=",">
#{userId}
</foreach>
</if>
</select>
<select id="getPartnerLastLine" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"></include>
FROM hy_partner_line_info h1
WHERE h1.create_time = (
SELECT MAX(h2.create_time)
FROM hy_partner_line_info h2
WHERE h1.partner_id = h2.partner_id
<if test="partnerIdList!=null and partnerIdList.size>0">
<foreach collection="partnerIdList" item="partnerId" open="and h1.partner_id in (" close=")" separator=",">
#{partnerId}
</foreach>
</if>
)
</select>
<select id="getFollowCountList" resultType="com.cool.store.dto.partner.LineCountDTO">
SELECT partner_id, COUNT(1) AS num_of_leads
FROM hy_partner_line_info
GROUP BY partner_id;
</select>
</mapper>