|
@@ -150,8 +150,8 @@ FROM
|
150
|
150
|
SELECT
|
151
|
151
|
a.*,
|
152
|
152
|
a.customer_id as customerId,
|
153
|
|
- b.name as consultantName,
|
154
|
|
- b.tel as consultTel,
|
|
153
|
+ IFNULL(b.name,d.user_name) as consultantName,
|
|
154
|
+ IFNULL(b.tel,d.phone) as consultTel,
|
155
|
155
|
c.nickname as recommendName,
|
156
|
156
|
c.tel as recommendTel,
|
157
|
157
|
(select if(ifnull(tpp.name, '') != '',tpp.name, tpp.nickname) from ta_share_person_from tspf left join ta_person tpp on tspf.share_person = tpp.person_id where tspf.is_first_time = 1 and a.person_id = tspf.person_id) as sharePersonName
|
|
@@ -159,6 +159,7 @@ FROM
|
159
|
159
|
ta_recommend_customer a
|
160
|
160
|
LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
|
161
|
161
|
LEFT JOIN ta_person c on a.recommend_person = c.person_id
|
|
162
|
+ LEFT JOIN ta_user d on d.user_id = b.user_id
|
162
|
163
|
<where>
|
163
|
164
|
a.status > 0
|
164
|
165
|
and a.realty_consultant is not null
|