胡轶钦 il y a 5 ans
Parent
révision
8b419843a0
1 fichiers modifiés avec 7 ajouts et 6 suppressions
  1. 7
    6
      src/main/resources/mapper/TaRecommendCustomerMapper.xml

+ 7
- 6
src/main/resources/mapper/TaRecommendCustomerMapper.xml Voir le fichier

@@ -668,15 +668,16 @@ FROM
668 668
 
669 669
     <select id="getCustomerIntentions" resultType="com.huiju.estateagents.entity.PersonIntention">
670 670
         SELECT
671
-            SUM( intention ) AS intention,
672
-            building_id,
673
-            building_name
671
+            SUM( a.intention ) AS intention,
672
+            a.building_id,
673
+            b.building_name
674 674
         FROM
675
-            `ta_person_intention_record`
675
+            ta_person_intention_record a
676
+            left join ta_building b on a.building_id = b.building_id
676 677
         WHERE
677
-            person_id = #{personId}
678
+           a.person_id = #{personId}
678 679
         GROUP BY
679
-            building_id
680
+            a.building_id
680 681
         ORDER BY
681 682
             intention DESC
682 683
     </select>