From d01fa2df1b46f45647e82be6d1476ea1e295f995 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期日, 27 十月 2024 21:31:53 +0800
Subject: [PATCH] 一个班级可以有多个老师

---
 src/main/resources/mapper/EducationResourceMapper.xml |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/EducationResourceMapper.xml b/src/main/resources/mapper/EducationResourceMapper.xml
index cb750e2..4bc65fb 100644
--- a/src/main/resources/mapper/EducationResourceMapper.xml
+++ b/src/main/resources/mapper/EducationResourceMapper.xml
@@ -32,6 +32,9 @@
             <if test="query.classId != null">
                 AND ter.class_id = #{query.classId}
             </if>
+            <if test="query.contentType != null and query.contentType != '' ">
+                AND ter.content_type = #{query.contentType}
+            </if>
         </where>
         ORDER BY
         ter.create_time DESC
@@ -65,6 +68,9 @@
             <if test="query.subjectId != null">
                 AND ter.subject_id = #{query.subjectId}
             </if>
+            <if test="query.contentType != null and query.contentType != '' ">
+                AND ter.content_type = #{query.contentType}
+            </if>
         </where>
         ORDER BY
         ter.create_time DESC
@@ -73,7 +79,7 @@
     <insert id="add" keyColumn="id" useGeneratedKeys="true">
         INSERT INTO t_education_resource(content_type, content_url, subject_id, introduction, create_time, update_time,
                                    attachment,create_user,class_id)
-            value (#{form.contentType}, #{form.contentUrl}, #{form.subjectId}, #{form.introduction}, #{form.createTime}, #{form.updateTime}, #{form.attachment},#{form.createUser},#{form.classId})
+            values (#{form.contentType}, #{form.contentUrl}, #{form.subjectId}, #{form.introduction}, #{form.createTime}, #{form.updateTime}, #{form.attachment},#{form.createUser},#{form.classId})
     </insert>
 
     <update id="update">

--
Gitblit v1.8.0