Browse Source

* bug fix

顾绍勇 5 years ago
parent
commit
5423ff75b6
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/main/resources/mapper/ActivityManageMapper.xml

+ 2
- 2
src/main/resources/mapper/ActivityManageMapper.xml View File

@@ -35,7 +35,7 @@
35 35
         -- 活动访问人数
36 36
         (select count( DISTINCT d.person_id ) from ta_person_visit_record d
37 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 39
             AND d.target_id = a.target_id
40 40
             AND d.`event` = 'detail'
41 41
         ) as visit_persons,
@@ -43,7 +43,7 @@
43 43
         -- 活动访问次数
44 44
         (select count(*) from ta_person_visit_record e
45 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 47
             AND e.target_id = a.target_id
48 48
             AND e.`event` = 'detail'
49 49
         ) as visit_num,