魏超 5 lat temu
rodzic
commit
54a32207e6

+ 3
- 5
src/main/resources/mapper/TaPersonIntentionRecordMapper.xml Wyświetl plik

@@ -43,7 +43,7 @@
43 43
         ORDER BY SUM(tpir.intention) DESC
44 44
     </select>
45 45
     <select id="selectExportIntentionUser" resultType="com.huiju.estateagents.excel.IntentionUser">
46
-        select t.*, IFNULL(b.nickname, c.user_name) as sharePersonName, ifnull(b.phone, c.phone) as sharePersonPhone, b1.scene_alias as personFrom, e.nickname as recommendPerson
46
+        select t.*, b1.scene_alias as personFrom, e.nickname as recommendPerson
47 47
         From (
48 48
 
49 49
         SELECT
@@ -72,11 +72,9 @@
72 72
 
73 73
         ) as t
74 74
         left join ta_share_person_from a on t.person_id = a.person_id
75
-        left join ta_user c on a.share_person = c.user_id
76
-        left join ta_person b on a.share_person = b.person_id
77
-        left join ta_person_from_record d on t.person_id = d.share_person_id and d.is_first_time = 1 and d.org_id = #{orgId}
75
+        left join ta_person_from_record d on t.person_id = d.person_id and d.is_first_time = 1 and d.org_id = #{orgId}
78 76
         left join td_wx_dict b1 on d.scene_id = b1.scene_id
79
-        left join ta_person e on d.person_id = e.person_id
77
+        left join ta_person e on d.share_person_id = e.person_id
80 78
 
81 79
         <trim prefix="where" prefixOverrides="and | or">
82 80
             <if test="buildingId != null and buildingId != ''">