Commit 3551119c by yao.xiao

修改-经纪人查询商机列表

parent 8370fcef
......@@ -10,6 +10,6 @@ public class OwnOpportunityInfo {
private String mobileNo;
private String opportunityFrom;//商机来源
private String opportunityDate;//商机时间
private Long mdDropOptionId;
private Long mdDropOptionName;
private Long leadsAssignedId;
}
\ No newline at end of file
......@@ -684,18 +684,18 @@
<result column="mobileNo" property="mobileNo" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>
<result column="opportunityFrom" property="opportunityFrom"/>
<result column="opportunityDate" property="opportunityDate"/>
<result column="mdDropOptionId" property="mdDropOptionId"/>
<result column="leadsAssignedId" property="leadsAssignedId"/>
<result column="mdDropOptionName" property="mdDropOptionName"/>
</resultMap>
<select id="ownOpportunityQuery" resultMap="opportunityQuery">
SELECT
a.customer_id opportunityId,
c.NAME name,
c.mobile_no mobileNo,
p.mkt_campaign mdDropOptionId,
date_format(a.created_at, '%Y-%m-%d %H:%i:%s') opportunityDate,
if (p.mkt_campaign is null ,'',(SELECT cam.name from ag_md_mk_campaign cam where cam.id = p.mkt_campaign )) opportunityFrom,
a.id leadsAssignedId
a.id leadsAssignedId ,
(SELECT md.drop_option_name from ag_md_drop_options md LEFT JOIN ag_mkt_leads_assigned_track amlat ON md.id = amlat.md_drop_option_id where amlat.practitioner_id = a.assigned_practitioner_id and amlat.customer_id = a.customer_id ORDER BY amlat.created_at DESC LIMIT 1) mdDropOptionName
FROM
ag_mkt_leads_assigneds a
LEFT JOIN ag_mkt_leads_pool p ON p.customer_id = a.customer_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment