初始化
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
<?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.SysTeacherContestMapper">
|
||||
|
||||
<resultMap type="SysTeacherContest" id="SysTeacherContestResult">
|
||||
<result property="contestId" column="contest_id" />
|
||||
<result property="teacherId" column="teacher_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="project" column="project" />
|
||||
<result property="awardLevel" column="awardLevel" />
|
||||
<result property="proofunit" column="proofunit" />
|
||||
<result property="level" column="level" />
|
||||
<result property="awardTime" column="awardTime" />
|
||||
<result property="participants" column="participants" />
|
||||
<result property="year" column="year" />
|
||||
<result property="certificate" column="certificate" />
|
||||
<result property="checkStatus" column="check_status" />
|
||||
<result property="checkPerson" column="check_person" />
|
||||
<result property="college" column="college" />
|
||||
<result property="returnReason" column="returnReason" />
|
||||
<result property="submitYear" column="submitYear" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysTeacherContestVo">
|
||||
select contest_id, teacher_id, name, project, awardLevel, proofunit, level, awardTime, participants, year, certificate, check_status, check_person, college, returnReason, submitYear from sys_teacher_contest
|
||||
</sql>
|
||||
|
||||
<select id="selectSysTeacherContestList" parameterType="SysTeacherContest" resultMap="SysTeacherContestResult">
|
||||
<include refid="selectSysTeacherContestVo"/>
|
||||
<where>
|
||||
<if test="teacherId != null "> and teacher_id = #{teacherId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="project != null and project != ''"> and project = #{project}</if>
|
||||
<if test="awardLevel != null and awardLevel != ''"> and awardLevel = #{awardLevel}</if>
|
||||
<if test="proofunit != null and proofunit != ''"> and proofunit = #{proofunit}</if>
|
||||
<if test="level != null and level != ''"> and level = #{level}</if>
|
||||
<if test="awardTime != null and awardTime != ''"> and awardTime = #{awardTime}</if>
|
||||
<if test="participants != null and participants != ''"> and participants = #{participants}</if>
|
||||
<if test="year != null and year != ''"> and year = #{year}</if>
|
||||
<if test="certificate != null and certificate != ''"> and certificate = #{certificate}</if>
|
||||
<if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if>
|
||||
<if test="checkPerson != null and checkPerson != ''"> and check_person = #{checkPerson}</if>
|
||||
<if test="college != null and college != ''"> and college = #{college}</if>
|
||||
<if test="returnReason != null and returnReason != ''"> and returnReason = #{returnReason}</if>
|
||||
<if test="submitYear != null and submitYear != ''"> and submitYear = #{submitYear}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysTeacherContestByContestId" parameterType="Long" resultMap="SysTeacherContestResult">
|
||||
<include refid="selectSysTeacherContestVo"/>
|
||||
where contest_id = #{contestId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysTeacherContest" parameterType="SysTeacherContest" useGeneratedKeys="true" keyProperty="contestId">
|
||||
insert into sys_teacher_contest
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="teacherId != null">teacher_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="project != null">project,</if>
|
||||
<if test="awardLevel != null">awardLevel,</if>
|
||||
<if test="proofunit != null">proofunit,</if>
|
||||
<if test="level != null">level,</if>
|
||||
<if test="awardTime != null">awardTime,</if>
|
||||
<if test="participants != null">participants,</if>
|
||||
<if test="year != null">year,</if>
|
||||
<if test="certificate != null">certificate,</if>
|
||||
<if test="checkStatus != null">check_status,</if>
|
||||
<if test="checkPerson != null">check_person,</if>
|
||||
<if test="college != null">college,</if>
|
||||
<if test="returnReason != null">returnReason,</if>
|
||||
<if test="submitYear != null">submitYear,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="teacherId != null">#{teacherId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="project != null">#{project},</if>
|
||||
<if test="awardLevel != null">#{awardLevel},</if>
|
||||
<if test="proofunit != null">#{proofunit},</if>
|
||||
<if test="level != null">#{level},</if>
|
||||
<if test="awardTime != null">#{awardTime},</if>
|
||||
<if test="participants != null">#{participants},</if>
|
||||
<if test="year != null">#{year},</if>
|
||||
<if test="certificate != null">#{certificate},</if>
|
||||
<if test="checkStatus != null">#{checkStatus},</if>
|
||||
<if test="checkPerson != null">#{checkPerson},</if>
|
||||
<if test="college != null">#{college},</if>
|
||||
<if test="returnReason != null">#{returnReason},</if>
|
||||
<if test="submitYear != null">#{submitYear},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysTeacherContest" parameterType="SysTeacherContest">
|
||||
update sys_teacher_contest
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="teacherId != null">teacher_id = #{teacherId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="project != null">project = #{project},</if>
|
||||
<if test="awardLevel != null">awardLevel = #{awardLevel},</if>
|
||||
<if test="proofunit != null">proofunit = #{proofunit},</if>
|
||||
<if test="level != null">level = #{level},</if>
|
||||
<if test="awardTime != null">awardTime = #{awardTime},</if>
|
||||
<if test="participants != null">participants = #{participants},</if>
|
||||
<if test="year != null">year = #{year},</if>
|
||||
<if test="certificate != null">certificate = #{certificate},</if>
|
||||
<if test="checkStatus != null">check_status = #{checkStatus},</if>
|
||||
<if test="checkPerson != null">check_person = #{checkPerson},</if>
|
||||
<if test="college != null">college = #{college},</if>
|
||||
<if test="returnReason != null">returnReason = #{returnReason},</if>
|
||||
<if test="submitYear != null">submitYear = #{submitYear},</if>
|
||||
</trim>
|
||||
where contest_id = #{contestId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysTeacherContestByContestId" parameterType="Long">
|
||||
delete from sys_teacher_contest where contest_id = #{contestId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysTeacherContestByContestIds" parameterType="String">
|
||||
delete from sys_teacher_contest where contest_id in
|
||||
<foreach item="contestId" collection="array" open="(" separator="," close=")">
|
||||
#{contestId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user