|
|
@@ -0,0 +1,180 @@
|
|
|
+<?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.usoftchina.smartschool.school.mapper.HomeWorkMapper" >
|
|
|
+ <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.HomeWork" >
|
|
|
+ <id column="task_id" property="task_id" jdbcType="BIGINT" />
|
|
|
+ <result column="subject_id" property="subject_id" jdbcType="BIGINT" />
|
|
|
+ <result column="task_title" property="task_title" jdbcType="VARCHAR" />
|
|
|
+ <result column="task_status" property="task_status" jdbcType="INTEGER" />
|
|
|
+ <result column="create_date" property="create_date" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="start_date" property="start_date" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="end_date" property="end_date" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="task_creator" property="task_creator" jdbcType="BIGINT" />
|
|
|
+ <result column="school_id" property="school_id" jdbcType="BIGINT" />
|
|
|
+ <result column="task_context" property="task_context" jdbcType="LONGVARCHAR" />
|
|
|
+ <result column="task_files" property="task_files" jdbcType="LONGVARCHAR" />
|
|
|
+ <result column="task_notifier" property="task_notifier" jdbcType="LONGVARCHAR" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
|
|
+ select
|
|
|
+ *
|
|
|
+ from task_notify
|
|
|
+ where task_id = #{task_id,jdbcType=BIGINT}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
|
|
+ delete from task_notify
|
|
|
+ where task_id = #{task_id,jdbcType=BIGINT}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
|
|
|
+ insert into task_notify (subject_id, task_title,
|
|
|
+ task_status, create_date, start_date,
|
|
|
+ end_date, task_creator, school_id,
|
|
|
+ task_context, task_files, task_notifier
|
|
|
+ )
|
|
|
+ values (#{subject_id,jdbcType=BIGINT}, #{task_title,jdbcType=VARCHAR},
|
|
|
+ #{task_status,jdbcType=INTEGER}, #{create_date,jdbcType=TIMESTAMP}, #{start_date,jdbcType=TIMESTAMP},
|
|
|
+ #{end_date,jdbcType=TIMESTAMP}, #{task_creator,jdbcType=BIGINT}, #{school_id,jdbcType=BIGINT},
|
|
|
+ #{task_context,jdbcType=LONGVARCHAR}, #{task_files,jdbcType=LONGVARCHAR}, #{task_notifier,jdbcType=LONGVARCHAR}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
|
|
|
+ insert into task_notify
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="subject_id != null" >
|
|
|
+ subject_id,
|
|
|
+ </if>
|
|
|
+ <if test="task_title != null" >
|
|
|
+ task_title,
|
|
|
+ </if>
|
|
|
+ <if test="task_status != null" >
|
|
|
+ task_status,
|
|
|
+ </if>
|
|
|
+ <if test="create_date != null" >
|
|
|
+ create_date,
|
|
|
+ </if>
|
|
|
+ <if test="start_date != null" >
|
|
|
+ start_date,
|
|
|
+ </if>
|
|
|
+ <if test="end_date != null" >
|
|
|
+ end_date,
|
|
|
+ </if>
|
|
|
+ <if test="task_creator != null" >
|
|
|
+ task_creator,
|
|
|
+ </if>
|
|
|
+ <if test="school_id != null" >
|
|
|
+ school_id,
|
|
|
+ </if>
|
|
|
+ <if test="task_context != null" >
|
|
|
+ task_context,
|
|
|
+ </if>
|
|
|
+ <if test="task_files != null" >
|
|
|
+ task_files,
|
|
|
+ </if>
|
|
|
+ <if test="task_notifier != null" >
|
|
|
+ task_notifier,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="subject_id != null" >
|
|
|
+ #{subject_id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="task_title != null" >
|
|
|
+ #{task_title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="task_status != null" >
|
|
|
+ #{task_status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="create_date != null" >
|
|
|
+ #{create_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="start_date != null" >
|
|
|
+ #{start_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="end_date != null" >
|
|
|
+ #{end_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="task_creator != null" >
|
|
|
+ #{task_creator,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="school_id != null" >
|
|
|
+ #{school_id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="task_context != null" >
|
|
|
+ #{task_context,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="task_files != null" >
|
|
|
+ #{task_files,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="task_notifier != null" >
|
|
|
+ #{task_notifier,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
|
|
|
+ update task_notify
|
|
|
+ <set >
|
|
|
+ <if test="subject_id != null" >
|
|
|
+ subject_id = #{subject_id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="task_title != null" >
|
|
|
+ task_title = #{task_title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="task_status != null" >
|
|
|
+ task_status = #{task_status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="create_date != null" >
|
|
|
+ create_date = #{create_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="start_date != null" >
|
|
|
+ start_date = #{start_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="end_date != null" >
|
|
|
+ end_date = #{end_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="task_creator != null" >
|
|
|
+ task_creator = #{task_creator,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="school_id != null" >
|
|
|
+ school_id = #{school_id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="task_context != null" >
|
|
|
+ task_context = #{task_context,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="task_files != null" >
|
|
|
+ task_files = #{task_files,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="task_notifier != null" >
|
|
|
+ task_notifier = #{task_notifier,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where task_id = #{task_id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
|
|
|
+ update task_notify
|
|
|
+ set subject_id = #{subject_id,jdbcType=BIGINT},
|
|
|
+ task_title = #{task_title,jdbcType=VARCHAR},
|
|
|
+ task_status = #{task_status,jdbcType=INTEGER},
|
|
|
+ create_date = #{create_date,jdbcType=TIMESTAMP},
|
|
|
+ start_date = #{start_date,jdbcType=TIMESTAMP},
|
|
|
+ end_date = #{end_date,jdbcType=TIMESTAMP},
|
|
|
+ task_creator = #{task_creator,jdbcType=BIGINT},
|
|
|
+ school_id = #{school_id,jdbcType=BIGINT},
|
|
|
+ task_context = #{task_context,jdbcType=LONGVARCHAR},
|
|
|
+ task_files = #{task_files,jdbcType=LONGVARCHAR},
|
|
|
+ task_notifier = #{task_notifier,jdbcType=LONGVARCHAR}
|
|
|
+ where task_id = #{task_id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
|
|
|
+ update task_notify
|
|
|
+ set subject_id = #{subject_id,jdbcType=BIGINT},
|
|
|
+ task_title = #{task_title,jdbcType=VARCHAR},
|
|
|
+ task_status = #{task_status,jdbcType=INTEGER},
|
|
|
+ create_date = #{create_date,jdbcType=TIMESTAMP},
|
|
|
+ start_date = #{start_date,jdbcType=TIMESTAMP},
|
|
|
+ end_date = #{end_date,jdbcType=TIMESTAMP},
|
|
|
+ task_creator = #{task_creator,jdbcType=BIGINT},
|
|
|
+ school_id = #{school_id,jdbcType=BIGINT}
|
|
|
+ where task_id = #{task_id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+</mapper>
|