|
@@ -111,12 +111,13 @@ FROM
|
111
|
111
|
SELECT
|
112
|
112
|
a.*,
|
113
|
113
|
a.customer_id AS customerId,
|
114
|
|
- b.NAME AS consultantName,
|
115
|
|
- b.tel AS consultTel,
|
|
114
|
+ if(b.NAME = null, d.name, b.name) as consultantName,
|
|
115
|
+ if(b.tel = null, d.tel, b.tel) AS consultTel,
|
116
|
116
|
c.building_name as intentionName
|
117
|
117
|
FROM
|
118
|
118
|
ta_recommend_customer a
|
119
|
|
- LEFT JOIN ta_person b ON (a.realty_consultant = b.person_id or a.realty_consultant = b.user_id)
|
|
119
|
+ LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
|
|
120
|
+ LEFT JOIN ta_person d on a.realty_consultant = d.user_id
|
120
|
121
|
LEFT JOIN ta_building c ON a.building_id = c.building_id
|
121
|
122
|
<where>
|
122
|
123
|
a.status > 0
|
|
@@ -553,6 +554,7 @@ FROM
|
553
|
554
|
order by b.create_date desc
|
554
|
555
|
</select>
|
555
|
556
|
<!-- limit #{pageCode}, #{pageSize}-->
|
|
557
|
+
|
556
|
558
|
<select id="getCustomerExportListCount" resultType="Integer" >
|
557
|
559
|
SELECT
|
558
|
560
|
count(1)
|
|
@@ -672,6 +674,7 @@ FROM
|
672
|
674
|
order by a.create_date desc
|
673
|
675
|
</select>
|
674
|
676
|
<!-- limit #{pageCode}, #{pageSize}-->
|
|
677
|
+
|
675
|
678
|
<select id="getMyCustStatistics" resultType="java.util.Map">
|
676
|
679
|
SELECT
|
677
|
680
|
sum( IF ( STATUS = 4 AND verify_status = 1, 1, 0 ) ) AS clinchSum,
|