From d088c46cf71c4a58f4f56f298dd38ed0bd1fcc40 Mon Sep 17 00:00:00 2001 From: whb <17803890193@163.com> Date: Wed, 19 Jun 2024 10:23:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=A0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=A1=A8=E9=83=A8=E5=88=86student=5Fid=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E9=83=A8=E5=88=86=E5=AD=A6=E7=94=9F=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=99=BB=E5=BD=95=E5=A4=A9=E6=95=B0=E4=B8=BAnull?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/main/resources/sql/jlw/student.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/web/src/main/resources/sql/jlw/student.md b/web/src/main/resources/sql/jlw/student.md index 4ab105d6..2bf61cbf 100644 --- a/web/src/main/resources/sql/jlw/student.md +++ b/web/src/main/resources/sql/jlw/student.md @@ -1507,7 +1507,7 @@ studentActiveInfo zxc.student_name, zxc.student_sn, (select sum(sl.open_id) from sys_log sl where request_url = #@com.ibeetl.jlw.conf.KeyExpiredListener.TOKEN_EXPIRED_MESSAGE# - and sl.student_id = zxc.student_id and sl.user_id = zxc.user_id) AS study_duration, + and sl.user_id = zxc.user_id ) AS study_duration, ( SELECT zz.rk @@ -1594,17 +1594,15 @@ studentActiveInfo 1 AND zz.id = zxc.user_id ) AS class_rank_no, - ( - SELECT count(1) - FROM ( - SELECT date(create_time) - FROM sys_log sl - WHERE request_url = #@com.ibeetl.jlw.conf.KeyExpiredListener.TOKEN_EXPIRED_MESSAGE# - AND sl.student_id = zxc.student_id - AND sl.user_id = zxc.user_id - GROUP BY date(create_time) - ) AS login_days - ) AS login_days +( + SELECT COUNT(1) + FROM ( + SELECT DISTINCT DATE(create_time) AS log_date + FROM sys_log sl + WHERE request_url = #@com.ibeetl.jlw.conf.KeyExpiredListener.TOKEN_EXPIRED_MESSAGE# + AND sl.user_id = zxc.user_id +) login_counts + ) AS login_days FROM ( SELECT user_id, org_id, class_id, student_name, student_sn, student_id FROM student WHERE 1 @if(!isEmpty(userId)) {