From 2873f1cd6ea6caac062740e05994a1f0a880ffde Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 12 三月 2024 11:27:20 +0800 Subject: [PATCH] 一个用户只能是一个部门的管理员、创建随机试卷的时候人员只能选当前部门的人,试卷增加部门id --- src/main/resources/mapper/QuestionSubjectMapper.xml | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/QuestionSubjectMapper.xml b/src/main/resources/mapper/QuestionSubjectMapper.xml index bd5e907..5811325 100644 --- a/src/main/resources/mapper/QuestionSubjectMapper.xml +++ b/src/main/resources/mapper/QuestionSubjectMapper.xml @@ -48,4 +48,11 @@ where subject_id = #{subjectId} </delete> + <select id="getSubject" resultMap="BaseResultMap"> + select qs.*,s.name as subName + from t_question_subject qs + left join t_subject s on qs.subject_id = s.id + where subject_id = #{id} and qs.deleted = 0 and s.deleted = 0 + </select> + </mapper> \ No newline at end of file -- Gitblit v1.8.0