魏超 5 年之前
父節點
當前提交
baf34f1a2e

+ 16
- 16
src/main/java/com/huiju/estateagents/excel/IntentionUser.java 查看文件

56
     @ExcelProperty(value = "置业顾问电话", index = 6)
56
     @ExcelProperty(value = "置业顾问电话", index = 6)
57
     private String realtyConsultantPhone;
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
     @ColumnWidth(15)
76
     @ColumnWidth(15)
77
-    @ExcelProperty(value = "性别", index = 9)
77
+    @ExcelProperty(value = "性别", index = 7)
78
     private String gender;
78
     private String gender;
79
 
79
 
80
     /**
80
     /**
81
      * 来源
81
      * 来源
82
      */
82
      */
83
     @ColumnWidth(15)
83
     @ColumnWidth(15)
84
-    @ExcelProperty(value = "用户来源", index = 10)
84
+    @ExcelProperty(value = "用户来源", index = 8)
85
     private String personFrom;
85
     private String personFrom;
86
 
86
 
87
     /**
87
     /**
88
      * 推广人
88
      * 推广人
89
      */
89
      */
90
     @ColumnWidth(15)
90
     @ColumnWidth(15)
91
-    @ExcelProperty(value = "推广人", index =11)
91
+    @ExcelProperty(value = "推广人", index = 9)
92
     private String recommendPerson;
92
     private String recommendPerson;
93
 
93
 
94
 }
94
 }

+ 1
- 1
src/main/resources/mapper/TaPersonIntentionRecordMapper.xml 查看文件

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

+ 11
- 8
src/main/resources/mapper/statistic/TaActivityStaticMapper.xml 查看文件

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