魏超 5 vuotta sitten
vanhempi
commit
c8ad094668
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3
    2
      src/main/resources/mapper/TaChannelMapper.xml

+ 3
- 2
src/main/resources/mapper/TaChannelMapper.xml Näytä tiedosto

@@ -53,8 +53,9 @@
53 53
             COUNT( rc.recommend_person ) AS recommendCount
54 54
         FROM
55 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 59
         <where>
59 60
             <if test="channelId != null and channelId != ''">
60 61
                 c.channel_id = #{channelId}