瀏覽代碼

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

weiximei 5 年之前
父節點
當前提交
079c482206
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      src/main/resources/mapper/TaPersonMapper.xml

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

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 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
+             group by tpvr.person_id
261
         ) AS temp ON temp_date.date = DATE_FORMAT( temp.visit_time , '%Y-%m-%d' )
262
         ) AS temp ON temp_date.date = DATE_FORMAT( temp.visit_time , '%Y-%m-%d' )
262
     </select>
263
     </select>
263
 
264