From 3c3c7cb06d7091d06109ad6076e9dcfd965356d9 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 05 六月 2024 15:40:08 +0800
Subject: [PATCH] 打包问题,正式数据备份
---
src/main/resources/mapper/UserMapper.xml | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml
index 1c55b8d..c6f89ad 100644
--- a/src/main/resources/mapper/UserMapper.xml
+++ b/src/main/resources/mapper/UserMapper.xml
@@ -346,8 +346,8 @@
<if test="userName != null and userName != ''">
AND real_name LIKE concat('%',#{userName},'%')
</if>
- <if test="role != null and role.size() > 0">
- AND role IN <foreach collection="role" item="item" open="(" separator="," close=")"> #{item} </foreach>
+ <if test="roles != null and roles.size() > 0">
+ AND role IN <foreach collection="roles" item="item" open="(" separator="," close=")"> #{item} </foreach>
</if>
GROUP BY a.id
</select>
@@ -551,18 +551,13 @@
</select>
<select id="getUserByExamByTemplateId" resultType="com.mindskip.xzs.domain.User" parameterType="com.mindskip.xzs.domain.ExamPaper">
- <![CDATA[
- SELECT DISTINCT
- d.*
- FROM
- t_exam_templates a
- INNER JOIN t_exam_templates_user_count b ON a.id = b.exam_templates_id and a.id = ${id}
- LEFT JOIN t_exam_paper_answer c ON b.exam_paper_id = c.exam_paper_id AND c.create_user = b.user_id and invalid = 0
- LEFT JOIN t_user d ON b.user_id = d.id
- WHERE
- ( c.id IS NULL OR ( user_score / paper_score ) < 0.6 )
- AND b.user_id = #{createUser}
- ]]>
+ select *
+ from t_user
+ where id in
+ (select user_id from t_exam_templates_user WHERE templates_id = #{id} and user_id not in
+ (SELECT create_user from t_exam_paper_answer where (user_score / paper_score) > 0.6 and (invalid = 0 or invalid is null) and exam_paper_id in
+ (select exam_paper_id from t_exam_templates_user_count WHERE exam_templates_id = #{id})))
+ and id = #{createUser}
</select>
<select id="getDeptIds" resultType="integer">
--
Gitblit v1.8.0