魏超 5 年之前
父節點
當前提交
c8ad094668
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3
    2
      src/main/resources/mapper/TaChannelMapper.xml

+ 3
- 2
src/main/resources/mapper/TaChannelMapper.xml 查看文件

53
             COUNT( rc.recommend_person ) AS recommendCount
53
             COUNT( rc.recommend_person ) AS recommendCount
54
         FROM
54
         FROM
55
         ta_channel c
55
         ta_channel c
56
-        LEFT JOIN ta_channel_person cp ON c.channel_id = cp.channel_id
57
-        LEFT JOIN ta_recommend_customer rc ON cp.person_id = rc.recommend_person 	AND rc.verify_status = 1 	AND rc.`status` = 1
56
+        LEFT JOIN ta_channel_person cp ON c.channel_id = cp.channel_id and cp.`status` = 1
57
+        LEFT JOIN ta_person t on cp.person_id = t.person_id and t.person_type = 'estate agent'
58
+        LEFT JOIN ta_recommend_customer rc ON t.person_id = rc.recommend_person AND rc.verify_status = 1 AND rc.`status` = 1
58
         <where>
59
         <where>
59
             <if test="channelId != null and channelId != ''">
60
             <if test="channelId != null and channelId != ''">
60
                 c.channel_id = #{channelId}
61
                 c.channel_id = #{channelId}