From d910a3e7ad5bc3a5e5443f506d05bbb9e83a4c8e Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 31 十月 2024 17:14:33 +0800
Subject: [PATCH] 生成试卷时如果题目列表为空,则不反悔这个题型的数据
---
src/main/resources/mapper/UserMapper.xml | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml
index 7ae6eba..c4bb36b 100644
--- a/src/main/resources/mapper/UserMapper.xml
+++ b/src/main/resources/mapper/UserMapper.xml
@@ -100,8 +100,8 @@
FROM t_user
<where>
and deleted=0
- <if test="userName != null and userName != ''">
- and user_name like concat('%',#{userName},'%')
+ <if test="realName != null and realName != ''">
+ and real_name like concat('%',#{realName},'%')
</if>
<if test="role != null ">
and role= #{role}
@@ -135,6 +135,9 @@
<set>
<if test="realName != null">real_name = #{realName},</if>
<if test="age != null">age = #{age},</if>
+ <if test="sex != null">sex = #{sex},</if>
+ <if test="phone != null and phone !='' ">phone = #{phone},</if>
+ <if test="birthDay != null ">birth_day = #{birthDay},</if>
<if test="lastActiveTime != null">last_active_time = #{lastActiveTime},</if>
</set>
where id = #{id}
@@ -201,9 +204,9 @@
tu.real_name,
tu.phone
FROM t_user tu
- INNER JOIN t_classes_user tcu ON tu.id = tcu.user_id
+ INNER JOIN t_classes_user tcu ON tu.id = tcu.user_id AND tcu.teacher = 0
WHERE tcu.classes_id = #{classesId}
- and tcu.deleted = 0
+ AND tcu.deleted = 0 AND tu.deleted = 0
ORDER BY tcu.create_time
</select>
--
Gitblit v1.8.0