胡轶钦 5 年之前
父節點
當前提交
8b419843a0
共有 1 個文件被更改,包括 7 次插入6 次删除
  1. 7
    6
      src/main/resources/mapper/TaRecommendCustomerMapper.xml

+ 7
- 6
src/main/resources/mapper/TaRecommendCustomerMapper.xml 查看文件

@@ -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>