Browse Source

修改 活跃用户数

weiximei 5 years ago
parent
commit
663f97c67b
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      src/main/resources/mapper/TaPersonMapper.xml

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

256
                 tpvr.visit_time AS visit_time
256
                 tpvr.visit_time AS visit_time
257
             FROM
257
             FROM
258
                ta_person tp
258
                ta_person tp
259
-             LEFT JOIN ta_person_visit_record tpvr ON tp.person_id = tpvr.person_id
259
+             LEFT JOIN
260
+            ( SELECT * FROM ta_person_visit_record GROUP BY  person_id  ) as tpvr
261
+            ON tp.person_id = tpvr.person_id
260
              where ifnull(tp.person_type, '') != #{personType}
262
              where ifnull(tp.person_type, '') != #{personType}
261
-             group by tpvr.person_id
262
         ) AS temp ON temp_date.date = DATE_FORMAT( temp.visit_time , '%Y-%m-%d' )
263
         ) AS temp ON temp_date.date = DATE_FORMAT( temp.visit_time , '%Y-%m-%d' )
263
     </select>
264
     </select>
264
 
265