魏超 5 anos atrás
pai
commit
baf34f1a2e

+ 16
- 16
src/main/java/com/huiju/estateagents/excel/IntentionUser.java Ver arquivo

@@ -56,39 +56,39 @@ public class IntentionUser {
56 56
     @ExcelProperty(value = "置业顾问电话", index = 6)
57 57
     private String realtyConsultantPhone;
58 58
 
59
-    /**
60
-     * 分享者
61
-     */
62
-    @ColumnWidth(15)
63
-    @ExcelProperty(value = "分享者", index = 7)
64
-    private String sharePersonName;
65
-
66
-    /**
67
-     * 分享者电话
68
-     */
69
-    @ColumnWidth(15)
70
-    @ExcelProperty(value = "分享者电话", index = 8)
71
-    private String sharePersonPhone;
59
+//    /**
60
+//     * 分享者
61
+//     */
62
+//    @ColumnWidth(15)
63
+//    @ExcelProperty(value = "分享者", index = 7)
64
+//    private String sharePersonName;
65
+//
66
+//    /**
67
+//     * 分享者电话
68
+//     */
69
+//    @ColumnWidth(15)
70
+//    @ExcelProperty(value = "分享者电话", index = 8)
71
+//    private String sharePersonPhone;
72 72
 
73 73
     /**
74 74
      * 性别
75 75
      */
76 76
     @ColumnWidth(15)
77
-    @ExcelProperty(value = "性别", index = 9)
77
+    @ExcelProperty(value = "性别", index = 7)
78 78
     private String gender;
79 79
 
80 80
     /**
81 81
      * 来源
82 82
      */
83 83
     @ColumnWidth(15)
84
-    @ExcelProperty(value = "用户来源", index = 10)
84
+    @ExcelProperty(value = "用户来源", index = 8)
85 85
     private String personFrom;
86 86
 
87 87
     /**
88 88
      * 推广人
89 89
      */
90 90
     @ColumnWidth(15)
91
-    @ExcelProperty(value = "推广人", index =11)
91
+    @ExcelProperty(value = "推广人", index = 9)
92 92
     private String recommendPerson;
93 93
 
94 94
 }

+ 1
- 1
src/main/resources/mapper/TaPersonIntentionRecordMapper.xml Ver arquivo

@@ -60,7 +60,7 @@
60 60
 
61 61
         FROM ta_person_intention_record tpir
62 62
         LEFT JOIN ta_person tp ON tpir.person_id = tp.person_id
63
-        left join ta_recommend_customer c on c.person_id = tpir.person_id
63
+        left join ta_recommend_customer c on c.person_id = tpir.person_id and c.building_id = tpir.building_id
64 64
         left join ta_user d on c.realty_consultant = d.user_id
65 65
         <trim prefix="where" prefixOverrides="and | or">
66 66
             <if test="orgId != null">

+ 11
- 8
src/main/resources/mapper/statistic/TaActivityStaticMapper.xml Ver arquivo

@@ -1105,7 +1105,8 @@
1105 1105
         ) as activity
1106 1106
 
1107 1107
         left join (
1108
-            SELECT count(1) as shareNum, a.be_share, case when a.tagert_type = 'liveApp' then 'live' when a.tagert_type = 'livePost' then 'live' else a.tagert_type end as tagert_type, a.create_date
1108
+            select count(1) as shareNum, a.* from (
1109
+            SELECT a.be_share, case when a.tagert_type = 'liveApp' then 'live' when a.tagert_type = 'livePost' then 'live' else a.tagert_type end as tagert_type, a.create_date
1109 1110
             FROM ta_share_count a where a.tagert_type in (
1110 1111
             'activity', 'group','h5','help','liveApp','livePost')
1111 1112
             and a.org_id = #{orgId}
@@ -1122,7 +1123,7 @@
1122 1123
             <if test="startDate == null or endDate == null ">
1123 1124
                 AND a.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
1124 1125
             </if>
1125
-            group by a.be_share,a.tagert_type order by a.create_date desc limit 9999999
1126
+            order by a.create_date desc limit 9999999) as a group by a.be_share,a.tagert_type order by a.create_date desc
1126 1127
         ) as shareNum on shareNum.be_share = activity.activityId and shareNum.tagert_type = activity.activityType
1127 1128
 
1128 1129
         left join (
@@ -1216,7 +1217,7 @@
1216 1217
         </if>
1217 1218
         group by activity.activityId, activity.activityType
1218 1219
         <if test="colKey == null or colKey == ''">
1219
-            order by sharePersonNum.create_date desc
1220
+            order by shareNum.create_date desc
1220 1221
         </if>
1221 1222
         <if test="colKey != null and colKey != ''">
1222 1223
             ORDER BY ${colKey} ${sortType}
@@ -1317,7 +1318,9 @@
1317 1318
         ) as activity
1318 1319
 
1319 1320
         left join (
1320
-        SELECT count(1) as shareNum, a.be_share, case when a.tagert_type = 'liveApp' then 'live' when a.tagert_type = 'livePost' then 'live' else a.tagert_type end as tagert_type, a.create_date
1321
+        select count(1) as shareNum, a.* from (
1322
+
1323
+        SELECT a.be_share, case when a.tagert_type = 'liveApp' then 'live' when a.tagert_type = 'livePost' then 'live' else a.tagert_type end as tagert_type, a.create_date
1321 1324
         FROM ta_share_count a where a.tagert_type in (
1322 1325
         'activity', 'group','h5','help','liveApp','livePost')
1323 1326
         and a.org_id = #{orgId}
@@ -1334,7 +1337,7 @@
1334 1337
         <if test="startDate == null or endDate == null ">
1335 1338
             AND a.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
1336 1339
         </if>
1337
-        group by a.be_share,a.tagert_type order by a.create_date desc limit 9999999
1340
+        order by a.create_date desc limit 9999999) as a group by a.be_share,a.tagert_type order by a.create_date desc
1338 1341
         ) as shareNum on shareNum.be_share = activity.activityId and shareNum.tagert_type = activity.activityType
1339 1342
 
1340 1343
         left join (
@@ -1428,7 +1431,7 @@
1428 1431
         </if>
1429 1432
         group by activity.activityId, activity.activityType
1430 1433
         <if test="colKey == null or colKey == ''">
1431
-            order by sharePersonNum.create_date desc
1434
+            order by shareNum.create_date desc
1432 1435
         </if>
1433 1436
         <if test="colKey != null and colKey != ''">
1434 1437
             ORDER BY ${colKey} ${sortType}
@@ -1971,7 +1974,7 @@
1971 1974
         a.province,
1972 1975
         b1.scene_alias as personFrom,
1973 1976
         GROUP_CONCAT(d.user_name) as realtyConsultant,
1974
-        d.phone as realtyConsultantPhone,
1977
+        group_concat(d.phone) as realtyConsultantPhone,
1975 1978
         ifnull(e.nickname, f.name) as sharePersonName,
1976 1979
         ifnull(e.phone, f.phone) as sharePersonPhone
1977 1980
         FROM ta_share_person_from t
@@ -2013,7 +2016,7 @@
2013 2016
         a.province,
2014 2017
         b1.scene_alias as personFrom,
2015 2018
         GROUP_CONCAT(d.user_name) as realtyConsultant,
2016
-        d.phone as realtyConsultantPhone,
2019
+        group_concat(d.phone) as realtyConsultantPhone,
2017 2020
         ifnull(e.nickname, f.name) as sharePersonName,
2018 2021
         ifnull(e.phone, f.phone) as sharePersonPhone
2019 2022
         FROM ta_share_person_from t