luohairen
2024-11-14 247cb86585a1d1894596ed18a6c93efecb992946
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">