Commit 68222f12 by jianan

商机回访排序

parent 8b96d0f1
package com.yd.dal.entity.practitioner.opportunity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class OwnOpportunityInfo {
private Long opportunityId;
......@@ -17,5 +20,6 @@ public class OwnOpportunityInfo {
private Long expertType;//0.经纪人指派 1.专家指派
private Long sfpMainId;
private String wechatNo;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date returnVisitTime;
}
......@@ -1519,6 +1519,7 @@
<result column="expertType" property="expertType" />
<result column="sfpMainId" property="sfpMainId" />
<result column="wechatNo" property="wechatNo" />
<result column="returnVisitTime" property="returnVisitTime" />
</resultMap>
<select id="ownOpportunityQuery" resultMap="opportunityQuery">
SELECT
......@@ -1535,7 +1536,8 @@
p.remark remark,
p.appointment_record_id appointmentRecordId,
p.sfp_main_id sfpMainId,
c.wechat_no wechatNo
c.wechat_no wechatNo,
(SELECT t.created_at from ag_mkt_leads_assigned_track t LEFT JOIN ag_md_drop_options op ON op.id = t.md_drop_option_id where t.leads_assigned_id = a.id and op.drop_option_code='returnvisit' ORDER BY t.created_at DESC LIMIT 1) returnVisitTime
FROM
ag_mkt_leads_assigneds a
left join ag_mkt_leads_expert_request r on r.customer_id = a.customer_id and r.is_active =1
......
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