Quellcode durchsuchen

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents into dev

张延森 vor 5 Jahren
Ursprung
Commit
6b0da58ebb

+ 2
- 2
src/main/resources/mapper/ActivityManageMapper.xml Datei anzeigen

35
         -- 活动访问人数
35
         -- 活动访问人数
36
         (select count( DISTINCT d.person_id ) from ta_person_visit_record d
36
         (select count( DISTINCT d.person_id ) from ta_person_visit_record d
37
         WHERE d.org_id = a.org_id
37
         WHERE d.org_id = a.org_id
38
-            AND (d.target_type = a.target_type OR d.event_type = a.target_type)
38
+            AND if(d.target_type is null ,d.event_type = a.target_type, d.target_type = REPLACE(a.target_type, 'activity', 'dynamic'))
39
             AND d.target_id = a.target_id
39
             AND d.target_id = a.target_id
40
             AND d.`event` = 'detail'
40
             AND d.`event` = 'detail'
41
         ) as visit_persons,
41
         ) as visit_persons,
43
         -- 活动访问次数
43
         -- 活动访问次数
44
         (select count(*) from ta_person_visit_record e
44
         (select count(*) from ta_person_visit_record e
45
         WHERE e.org_id = a.org_id
45
         WHERE e.org_id = a.org_id
46
-            AND (e.target_type = a.target_type OR e.event_type = a.target_type)
46
+            AND if(e.target_type is null ,e.event_type = a.target_type, e.target_type = REPLACE(a.target_type, 'activity', 'dynamic'))
47
             AND e.target_id = a.target_id
47
             AND e.target_id = a.target_id
48
             AND e.`event` = 'detail'
48
             AND e.`event` = 'detail'
49
         ) as visit_num,
49
         ) as visit_num,

+ 2
- 2
src/main/resources/mapper/TaPersonIntentionRecordMapper.xml Datei anzeigen

16
 
16
 
17
     <select id="selectIntentionUser" resultType="map">
17
     <select id="selectIntentionUser" resultType="map">
18
         SELECT
18
         SELECT
19
-            tpir.person_name as  personName,
19
+            tp.nickname as  personName,
20
             tp.phone as phone,
20
             tp.phone as phone,
21
             tpir.building_name as buildingName,
21
             tpir.building_name as buildingName,
22
             SUM(tpir.intention) as intention
22
             SUM(tpir.intention) as intention
47
         From (
47
         From (
48
 
48
 
49
         SELECT
49
         SELECT
50
-        tpir.person_name as person_name,
50
+        tp.nickname as person_name,
51
         if(tp.gender = '1' , '男', if(tp.gender = '2', '女', '未知')) as gender,
51
         if(tp.gender = '1' , '男', if(tp.gender = '2', '女', '未知')) as gender,
52
         tp.phone as phone,
52
         tp.phone as phone,
53
         tp.province,
53
         tp.province,

+ 6
- 6
src/main/resources/mapper/statistic/TaActivityStaticMapper.xml Datei anzeigen

764
         <if test="startDate == null or endDate == null">
764
         <if test="startDate == null or endDate == null">
765
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
765
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
766
         </if>
766
         </if>
767
-        GROUP BY t.person_id, t.target_type
767
+        GROUP BY t.person_id
768
         ) as temp4 GROUP BY DATE_FORMAT(temp4.create_date,'%Y-%m-%d')
768
         ) as temp4 GROUP BY DATE_FORMAT(temp4.create_date,'%Y-%m-%d')
769
         ) AS temp4 ON temp_date.date = DATE_FORMAT( temp4.create_date, '%Y-%m-%d' )
769
         ) AS temp4 ON temp_date.date = DATE_FORMAT( temp4.create_date, '%Y-%m-%d' )
770
         GROUP BY date
770
         GROUP BY date
999
         <if test="startDate == null or endDate == null">
999
         <if test="startDate == null or endDate == null">
1000
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
1000
             AND t.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
1001
         </if>
1001
         </if>
1002
-        GROUP BY t.person_id, t.target_type
1002
+        GROUP BY t.person_id
1003
         ) as temp4 GROUP BY DATE_FORMAT(temp4.create_date,'%Y-%m-%d')
1003
         ) as temp4 GROUP BY DATE_FORMAT(temp4.create_date,'%Y-%m-%d')
1004
         ) AS temp4 ON temp_date.date = DATE_FORMAT( temp4.create_date, '%Y-%m-%d' )
1004
         ) AS temp4 ON temp_date.date = DATE_FORMAT( temp4.create_date, '%Y-%m-%d' )
1005
         GROUP BY date
1005
         GROUP BY date
1519
         ) as person
1519
         ) as person
1520
 
1520
 
1521
         left join (
1521
         left join (
1522
-            select count(*) as shareNum, temp.person_id from (
1522
+            select count(*) as shareNum, temp.person_id, temp.create_date from (
1523
                 SELECT t.person_id, t.create_date
1523
                 SELECT t.person_id, t.create_date
1524
                 FROM ta_share_count t
1524
                 FROM ta_share_count t
1525
                 LEFT JOIN ta_help_activity a ON t.be_share = a.help_activity_id
1525
                 LEFT JOIN ta_help_activity a ON t.be_share = a.help_activity_id
1585
         ) as visitPersonNum on visitPersonNum.person_id = person.person_id
1585
         ) as visitPersonNum on visitPersonNum.person_id = person.person_id
1586
         group by person.person_id
1586
         group by person.person_id
1587
         <if test="colKey == null or colKey == ''">
1587
         <if test="colKey == null or colKey == ''">
1588
-            order by person.create_date desc
1588
+            order by shareNum.create_date desc
1589
         </if>
1589
         </if>
1590
         <if test="colKey != null and colKey != ''">
1590
         <if test="colKey != null and colKey != ''">
1591
             ORDER BY ${colKey} ${sort}
1591
             ORDER BY ${colKey} ${sort}
1680
         ) as person
1680
         ) as person
1681
 
1681
 
1682
         left join (
1682
         left join (
1683
-        select count(*) as shareNum, temp.person_id from (
1683
+        select count(*) as shareNum, temp.person_id, temp.create_date from (
1684
         SELECT t.person_id, t.create_date
1684
         SELECT t.person_id, t.create_date
1685
         FROM ta_share_count t
1685
         FROM ta_share_count t
1686
         LEFT JOIN ta_help_activity a ON t.be_share = a.help_activity_id
1686
         LEFT JOIN ta_help_activity a ON t.be_share = a.help_activity_id
1746
         ) as visitPersonNum on visitPersonNum.person_id = person.person_id
1746
         ) as visitPersonNum on visitPersonNum.person_id = person.person_id
1747
         group by person.person_id
1747
         group by person.person_id
1748
         <if test="colKey == null or colKey == ''">
1748
         <if test="colKey == null or colKey == ''">
1749
-            order by person.create_date desc
1749
+            order by shareNum.create_date desc
1750
         </if>
1750
         </if>
1751
         <if test="colKey != null and colKey != ''">
1751
         <if test="colKey != null and colKey != ''">
1752
             ORDER BY ${colKey} ${sort}
1752
             ORDER BY ${colKey} ${sort}