96 lines
5.1 KiB
XML
96 lines
5.1 KiB
XML
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
|
<!DOCTYPE mapper
|
||
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
|
<mapper namespace="com.srs.teacher.mapper.SysTeacherStuTestMaterialsMapper">
|
||
|
|
|
||
|
|
<resultMap type="com.srs.teacher.domain.SysTeacherStuTestMaterials" id="SysTeacherStuTestMaterialsResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="developmentTime" column="development_time" />
|
||
|
|
<result property="place" column="place" />
|
||
|
|
<result property="className" column="class_name" />
|
||
|
|
<result property="numberOfStudents" column="number_of_students" />
|
||
|
|
<result property="mainContent" column="main_content" />
|
||
|
|
<result property="photo" column="photo" />
|
||
|
|
<result property="fdyName" column="fdy_name" />
|
||
|
|
<result property="fillingYear" column="filling_year" />
|
||
|
|
<result property="fillingMonth" column="filling_month" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectSysTeacherStuTestMaterialsVo">
|
||
|
|
select id, development_time, place, class_name, number_of_students, main_content, photo, fdy_name, filling_year, filling_month from sys_teacher_stu_test_materials
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectSysTeacherStuTestMaterialsList" parameterType="com.srs.teacher.domain.SysTeacherStuTestMaterials" resultMap="SysTeacherStuTestMaterialsResult">
|
||
|
|
<include refid="selectSysTeacherStuTestMaterialsVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="fdyName != null and fdyName != ''"> and fdy_name = #{fdyName}</if>
|
||
|
|
<if test="fillingYear != null and fillingYear != ''"> and filling_year = #{fillingYear}</if>
|
||
|
|
<if test="fillingMonth != null and fillingMonth != ''"> and filling_month = #{fillingMonth}</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectSysTeacherStuTestMaterialsByFdyName" parameterType="String" resultMap="SysTeacherStuTestMaterialsResult">
|
||
|
|
<include refid="selectSysTeacherStuTestMaterialsVo"/>
|
||
|
|
where fdy_name = #{fdyName} and filling_year = #{fillingYear} and filling_month = #{fillingMonth}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectSysTeacherStuTestMaterialsById" parameterType="Long" resultMap="SysTeacherStuTestMaterialsResult">
|
||
|
|
<include refid="selectSysTeacherStuTestMaterialsVo"/>
|
||
|
|
where id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertSysTeacherStuTestMaterials" parameterType="com.srs.teacher.domain.SysTeacherStuTestMaterials" useGeneratedKeys="true" keyProperty="id">
|
||
|
|
insert into sys_teacher_stu_test_materials
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="developmentTime != null">development_time,</if>
|
||
|
|
<if test="place != null">place,</if>
|
||
|
|
<if test="className != null">class_name,</if>
|
||
|
|
<if test="numberOfStudents != null">number_of_students,</if>
|
||
|
|
<if test="mainContent != null">main_content,</if>
|
||
|
|
<if test="photo != null">photo,</if>
|
||
|
|
<if test="fdyName != null">fdy_name,</if>
|
||
|
|
<if test="fillingYear != null">filling_year,</if>
|
||
|
|
<if test="fillingMonth != null">filling_month,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="developmentTime != null">#{developmentTime},</if>
|
||
|
|
<if test="place != null">#{place},</if>
|
||
|
|
<if test="className != null">#{className},</if>
|
||
|
|
<if test="numberOfStudents != null">#{numberOfStudents},</if>
|
||
|
|
<if test="mainContent != null">#{mainContent},</if>
|
||
|
|
<if test="photo != null">#{photo},</if>
|
||
|
|
<if test="fdyName != null">#{fdyName},</if>
|
||
|
|
<if test="fillingYear != null">#{fillingYear},</if>
|
||
|
|
<if test="fillingMonth != null">#{fillingMonth},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateSysTeacherStuTestMaterials" parameterType="com.srs.teacher.domain.SysTeacherStuTestMaterials">
|
||
|
|
update sys_teacher_stu_test_materials
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="developmentTime != null">development_time = #{developmentTime},</if>
|
||
|
|
<if test="place != null">place = #{place},</if>
|
||
|
|
<if test="className != null">class_name = #{className},</if>
|
||
|
|
<if test="numberOfStudents != null">number_of_students = #{numberOfStudents},</if>
|
||
|
|
<if test="mainContent != null">main_content = #{mainContent},</if>
|
||
|
|
<if test="photo != null">photo = #{photo},</if>
|
||
|
|
<if test="fdyName != null">fdy_name = #{fdyName},</if>
|
||
|
|
<if test="fillingYear != null">filling_year = #{fillingYear},</if>
|
||
|
|
<if test="fillingMonth != null">filling_month = #{fillingMonth},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteSysTeacherStuTestMaterialsById" parameterType="Long">
|
||
|
|
delete from sys_teacher_stu_test_materials where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteSysTeacherStuTestMaterialsByIds" parameterType="String">
|
||
|
|
delete from sys_teacher_stu_test_materials where id in
|
||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
</mapper>
|