|
@@ -505,20 +505,19 @@ FROM
|
505
|
505
|
select
|
506
|
506
|
p.person_id,
|
507
|
507
|
p.avatarurl,
|
508
|
|
- p.tel,
|
509
|
508
|
p.sex,
|
510
|
|
- rc.`name`,
|
511
|
|
- rc.phone,
|
|
509
|
+ rc.`name` as name,
|
|
510
|
+ rc.phone as tel,
|
512
|
511
|
COUNT(rc.person_id) as recommendCount
|
513
|
512
|
from ta_channel_person tch
|
514
|
513
|
left join ta_person p on tch.person_id = p.person_id
|
515
|
|
- LEFT JOIN ta_recommend_customer rc ON p.person_id = rc.person_id and rc.report_recommend_status = 1
|
|
514
|
+ LEFT JOIN ta_recommend_customer rc ON p.person_id = rc.person_id
|
516
|
515
|
<where>
|
517
|
516
|
<if test="name !=null and name !=''">
|
518
|
|
- and rc.`name` = #{name}
|
|
517
|
+ and rc.name like CONCAT('%',#{name}, '%')
|
519
|
518
|
</if>
|
520
|
519
|
<if test="phone !=null and phone !=''">
|
521
|
|
- and rc.phone = #{phone}
|
|
520
|
+ and rc.phone like CONCAT('%',#{phone}, '%')
|
522
|
521
|
</if>
|
523
|
522
|
and p.org_id= #{orgid}
|
524
|
523
|
and tch.channel_id = #{channelId}
|