From 0a00e986d49140edf3a2b6d6038b3314e79f6560 Mon Sep 17 00:00:00 2001 From: Mlxa0324 Date: Wed, 22 Mar 2023 23:47:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=A2=E6=A0=A1=E4=BD=BF=E7=94=A8=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/dto/SystemUseLogsAnalysisDTO.java | 12 ++--- .../jlw/studentTeacherSystemUseLogAnalysis.md | 54 ++++++------------- 2 files changed, 21 insertions(+), 45 deletions(-) diff --git a/web/src/main/java/com/ibeetl/jlw/entity/dto/SystemUseLogsAnalysisDTO.java b/web/src/main/java/com/ibeetl/jlw/entity/dto/SystemUseLogsAnalysisDTO.java index 06e8a970..f0af485c 100644 --- a/web/src/main/java/com/ibeetl/jlw/entity/dto/SystemUseLogsAnalysisDTO.java +++ b/web/src/main/java/com/ibeetl/jlw/entity/dto/SystemUseLogsAnalysisDTO.java @@ -19,22 +19,22 @@ public class SystemUseLogsAnalysisDTO extends PageParam { /** * 使用时间-开始时间 */ - private Date startTime; + private Date startDayTime; /** * 使用时间-结束时间 */ - private Date endTime; + private Date endDayTime; /** * 院校ID */ private String universitiesCollegesId; /** - * 子系统ID + * 第一名称(原型图上的所属模块) */ - private String applicationId; + private String firstName; /** - * 归属模块 + * 第二名称(原型图上的子系统名称) */ - private String courseLabelType; + private String secondName; } diff --git a/web/src/main/resources/sql/jlw/studentTeacherSystemUseLogAnalysis.md b/web/src/main/resources/sql/jlw/studentTeacherSystemUseLogAnalysis.md index 9d14e9c6..37aa97e9 100644 --- a/web/src/main/resources/sql/jlw/studentTeacherSystemUseLogAnalysis.md +++ b/web/src/main/resources/sql/jlw/studentTeacherSystemUseLogAnalysis.md @@ -515,58 +515,34 @@ applicationUseLogsAnalysis second_name, universities_colleges_name, universities_colleges_id, - user_type, province, day_time, - use_duration, - add_time, - org_id, - user_id + sum(use_duration) as sum_use_duration @} from student_teacher_system_use_log_analysis t - where 1=1 - @if(!isEmpty(id)){ - and t.id =#id# - @} + where 1=1 @if(!isEmpty(firstName)){ and t.first_name =#firstName# @} @if(!isEmpty(secondName)){ and t.second_name =#secondName# @} - @if(!isEmpty(universitiesCollegesName)){ - and t.universities_colleges_name =#universitiesCollegesName# - @} @if(!isEmpty(universitiesCollegesId)){ and t.universities_colleges_id =#universitiesCollegesId# @} - @if(!isEmpty(universitiesCollegesIdPlural)){ - and find_in_set(t.universities_colleges_id,#universitiesCollegesIdPlural#) - @} - @if(!isEmpty(userType)){ - and t.user_type =#userType# - @} - @if(!isEmpty(province)){ - and t.province =#province# - @} - @if(!isEmpty(dayTime)){ - and t.day_time =#dayTime# - @} - @if(!isEmpty(useDuration)){ - and t.use_duration =#useDuration# - @} - @if(!isEmpty(addTime)){ - and t.add_time =#addTime# - @} - @if(!isEmpty(orgId)){ - and t.org_id =#orgId# - @} - @if(!isEmpty(orgIdPlural)){ - and find_in_set(t.org_id,#orgIdPlural#) + @if(!isEmpty(startDayTime)){ + and t.day_time >= #startDayTime# @} - @if(!isEmpty(userId)){ - and t.user_id =#userId# + @if(!isEmpty(endDayTime)){ + and t.day_time < #endDayTime# @} - @if(!isEmpty(userIdPlural)){ - and find_in_set(t.user_id,#userIdPlural#) + group by + first_name, + second_name, + universities_colleges_name, + universities_colleges_id, + province, + day_time + @pageIgnoreTag() { + ORDER BY day_time DESC @} \ No newline at end of file