66 lines
3.4 KiB
XML
66 lines
3.4 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.comprehensive.mapper.SchoolYearMapper">
|
|
|
|
<resultMap type="SchoolYear" id="SchoolYearS">
|
|
<result property="id" column="id" />
|
|
<result property="stuYearName" column="stu_year_name" />
|
|
<result property="startTime" column="start_time" />
|
|
<result property="endTime" column="end_time" />
|
|
<result property="stuYearCode" column="stu_year_code" />
|
|
<result property="writeTime" column="write_time" />
|
|
<result property="readTime" column="read_time" />
|
|
<result property="dataStatus" column="data_status" />
|
|
<result property="chmodStatus" column="chmod_status" />
|
|
|
|
</resultMap>
|
|
<sql id="selectSchoolYear">
|
|
select * from school_year
|
|
</sql>
|
|
<select id="selectSchoolYearAll" parameterType="SchoolYear" resultMap="SchoolYearS">
|
|
<include refid="selectSchoolYear"/>
|
|
where data_status='1' and chmod_status='1'
|
|
</select>
|
|
|
|
<insert id="insertSumSportTest" parameterType="SchoolYear">
|
|
insert into school_year
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="stuNo != null and stuNo != ''">stu_no,</if>
|
|
<if test="testScore != null">test_score,</if>
|
|
<if test="stuYearId != null">stu_year_id,</if>
|
|
<if test="writeTime != null">write_time,</if>
|
|
<if test="readTime != null">read_time,</if>
|
|
<if test="dataStatus != null and dataStatus != ''">data_status,</if>
|
|
<if test="chmodStatus != null and chmodStatus != ''">chmod_status,</if>
|
|
<if test="stuYearCode != null and stuYearCode != ''">stu_year_code,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="stuNo != null and stuNo != ''">#{stuNo},</if>
|
|
<if test="testScore != null">#{testScore},</if>
|
|
<if test="stuYearId != null">#{stuYearId},</if>
|
|
<if test="writeTime != null">#{writeTime},</if>
|
|
<if test="readTime != null">#{readTime},</if>
|
|
<if test="dataStatus != null and dataStatus != ''">#{dataStatus},</if>
|
|
<if test="chmodStatus != null and chmodStatus != ''">#{chmodStatus},</if>
|
|
<if test="stuYearCode != null and stuYearCode != ''">#{stuYearCode},</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateSchoolYear" parameterType="SchoolYear">
|
|
update school_year
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="stuYearName != null and stuYearName != ''">stu_year_name = #{stuYearName},</if>
|
|
<if test="startTime != null">start_time = #{startTime},</if>
|
|
<if test="endTime != null">end_time = #{endTime},</if>
|
|
<if test="stuYearCode != null and stuYearCode != ''">stu_year_code = #{stuYearCode},</if>
|
|
<if test="writeTime != null">write_time = #{writeTime},</if>
|
|
<if test="readTime != null">read_time = #{readTime},</if>
|
|
<if test="dataStatus != null and dataStatus != ''">data_status = #{dataStatus},</if>
|
|
<if test="chmodStatus != null and chmodStatus != ''">chmod_status = #{chmodStatus},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
</mapper> |