From af2fcff9e1afe19641e9ca29c6a4298431292c0e Mon Sep 17 00:00:00 2001 From: JYW <2013732181@qq.com> Date: 星期四, 09 五月 2024 10:59:09 +0800 Subject: [PATCH] 修改首页和登录bug --- performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml index a1c5d61..d903fed 100644 --- a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml +++ b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml @@ -5,18 +5,19 @@ <select id="performanceShiftPage" resultType="map"> SELECT if(u.department is not null and u.department != '', CONCAT(u.name, '锛�', u.department, '锛�'), u.name) name, - GROUP_CONCAT(s.work_time, '锛�', s.shift, '锛�', s.id SEPARATOR ';') AS shiftTime + GROUP_CONCAT(s.work_time, '锛�', s.shift, '锛�', s.id order by s.work_time SEPARATOR ';') AS shiftTime FROM performance_shift s LEFT JOIN user u on u.id = s.user_id - GROUP BY u.id <where> <if test="time != null and time != ''"> - and s.work_time in DATE_FORMAT(#{time}, '%Y-%m-%d') + and DATE_FORMAT(s.work_time, '%Y-%m') = DATE_FORMAT(#{time}, '%Y-%m' ) </if> <if test="userName != null and userName != ''"> - and s.name concat('%', #{userName}, '%') + and u.name like concat('%', #{userName}, '%') </if> - <if test="laboratory != null and laboratory != ''"></if> + <if test="laboratory != null and laboratory != ''"> + </if> </where> + GROUP BY u.id </select> </mapper> -- Gitblit v1.9.3