Browse Source

修改 活跃用户数,以 person 为主表

weiximei 5 years ago
parent
commit
442f5ef5a7
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/main/resources/mapper/TaPersonMapper.xml

+ 1
- 1
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
-            INNER JOIN ta_person_visit_record tpvr ON tp.person_id = tpvr.person_id
259
+            LEFT JOIN ta_person_visit_record tpvr ON tp.person_id = tpvr.person_id
260
              where ifnull(tp.person_type, '') != #{personType}
260
              where ifnull(tp.person_type, '') != #{personType}
261
         ) AS temp ON temp_date.date = DATE_FORMAT( temp.visit_time , '%Y-%m-%d' )
261
         ) AS temp ON temp_date.date = DATE_FORMAT( temp.visit_time , '%Y-%m-%d' )
262
     </select>
262
     </select>