From 247cb86585a1d1894596ed18a6c93efecb992946 Mon Sep 17 00:00:00 2001
From: luohairen <3399054449@qq.com>
Date: 星期四, 14 十一月 2024 10:34:27 +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