This commit is contained in:
苏竹红
2023-06-19 16:45:19 +08:00
parent 7841a58081
commit b76e3ec754
8 changed files with 246 additions and 29 deletions

View File

@@ -432,6 +432,71 @@
</select>
<select id="getPrivateSeaLineList" resultType="com.cool.store.dto.partner.PrivateSeaLineDTO">
SELECT
hpli.id as lineId,
hpli.partner_id as partnerId,
hpli.workflow_stage as workflowStage,
hpli.workflow_status as workflowStatus,
hpli.deadline as deadline,
hpli.investment_manager as investmentManager,
hpli.development_manager as developmentManager,
hpli.line_status as lineStatus,
hpli.update_time as updateTime,
hpii.want_shop_area as wantShopArea,
hpii.accept_adjust_type as acceptAdjustType,
hpuinfo.username as partnerUserName,
hpuinfo.mobile as partnerUserPhone,
hpuinfo.shop_name as storeName,
hpuinfo.recommend_partner_name as recommendPartnerName,
eu.name as investmentManagerName
FROM
hy_partner_line_info hpli
LEFT JOIN hy_partner_intent_info hpii ON hpli.id = hpii.partner_line_id
LEFT JOIN hy_partner_user_info hpuinfo ON hpli.partner_id = hpuinfo.partner_id
LEFT JOIN enterprise_user eu ON hpli.investment_manager = eu.user_id
WHERE line_status in (1,2)
<if test="keywordType!=null and keywordType=='name'">
AND (eu.name like concat('%',#{keyword},'%') or hpuinfo.username like concat('%',#{keyword},'%'))
</if>
<if test="keywordType!=null and keywordType=='mobile'">
AND ( eu.mobile like concat('%',#{keyword},'%') or hpuinfo.mobile like concat('%',#{keyword},'%')')
</if>
<if test="workflowStage!=null and workflowStage!=''">
AND hpli.workflow_stage = #{workflowStage}
</if>
<if test="workflowStatus!=null and workflowStatus!=''">
AND hpli.workflow_status = #workflowStatus}
</if>
<if test="deadlineStart!=null and deadlineEnd!=null">
AND hpli.deadline BETWEEN #{deadlineStart} and #{deadlineStart}
</if>
<if test="intentArea!=null and intentArea!=''">
AND hpuinfo.want_shop_area = #{intentArea}
</if>
<if test="acceptAdjustType!=null">
AND hpuinfo.accept_adjust_type = #{acceptAdjustType}
</if>
<if test="storeKeywordType!=null and storeKeywordType==storeCode">
AND hpuinfo.shop_code like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeywordType!=null and storeKeywordType==storeName">
AND hpuinfo.shop_name like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeywordType!=null and storeKeywordType==partnerName">
AND hpuinfo.recommend_partner_name like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeywordType!=null and storeKeywordType==partnerMobile">
AND hpuinfo.recommend_partner_mobile like concat('%',#{storeKeyword},'%')
</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>