|
|
@@ -1,169 +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.NoticeMapper" >
|
|
|
- <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.Notify" >
|
|
|
- <id column="notify_id" property="notify_id" jdbcType="BIGINT" />
|
|
|
- <result column="notify_title" property="notify_title" jdbcType="VARCHAR" />
|
|
|
- <result column="notify_type" property="notify_type" jdbcType="INTEGER" />
|
|
|
- <result column="notify_creator" property="notify_creator" jdbcType="BIGINT" />
|
|
|
- <result column="create_date" property="create_date" jdbcType="TIMESTAMP" />
|
|
|
- <result column="notify_status" property="notify_status" jdbcType="INTEGER" />
|
|
|
- <result column="notify_remarks" property="notify_remarks" jdbcType="VARCHAR" />
|
|
|
- <result column="school_id" property="school_id" jdbcType="BIGINT" />
|
|
|
- <result column="notify_details" property="notify_details" jdbcType="LONGVARCHAR" />
|
|
|
- <result column="notify_files" property="notify_files" jdbcType="LONGVARCHAR" />
|
|
|
- <result column="notify_teacher" property="notify_teacher" jdbcType="LONGVARCHAR" />
|
|
|
- <result column="notify_stu" property="notify_stu" jdbcType="LONGVARCHAR" />
|
|
|
- <result column="publish_date" property="publish_date" jdbcType="TIMESTAMP" />
|
|
|
- <result column="creator" property="creator" jdbcType="VARCHAR" />
|
|
|
- </resultMap>
|
|
|
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
|
|
+<mapper namespace="com.usoftchina.smartschool.school.mapper.NoticeMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.Notify">
|
|
|
+ <id column="notify_id" property="notify_id" jdbcType="BIGINT"/>
|
|
|
+ <result column="notify_title" property="notify_title" jdbcType="VARCHAR"/>
|
|
|
+ <result column="notify_type" property="notify_type" jdbcType="INTEGER"/>
|
|
|
+ <result column="notify_creator" property="notify_creator" jdbcType="BIGINT"/>
|
|
|
+ <result column="create_date" property="create_date" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="notify_status" property="notify_status" jdbcType="INTEGER"/>
|
|
|
+ <result column="notify_remarks" property="notify_remarks" jdbcType="VARCHAR"/>
|
|
|
+ <result column="school_id" property="school_id" jdbcType="BIGINT"/>
|
|
|
+ <result column="notify_details" property="notify_details" jdbcType="LONGVARCHAR"/>
|
|
|
+ <result column="notify_files" property="notify_files" jdbcType="LONGVARCHAR"/>
|
|
|
+ <result column="notify_teacher" property="notify_teacher" jdbcType="LONGVARCHAR"/>
|
|
|
+ <result column="notify_stu" property="notify_stu" jdbcType="LONGVARCHAR"/>
|
|
|
+ <result column="publish_date" property="publish_date" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="creator" property="creator" jdbcType="VARCHAR"/>
|
|
|
+ <result column="accessory" property="accessory" jdbcType="VARCHAR"/>
|
|
|
+ </resultMap>
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
|
|
|
select *
|
|
|
from notify
|
|
|
where notify_id = #{notify_id,jdbcType=BIGINT}
|
|
|
</select>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
delete from notify
|
|
|
where notify_id = #{notify_id,jdbcType=BIGINT}
|
|
|
</delete>
|
|
|
- <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.Notify" >
|
|
|
+ <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.Notify">
|
|
|
insert into notify (notify_id, notify_title, notify_type,
|
|
|
notify_creator, create_date, notify_status,
|
|
|
notify_remarks, school_id, notify_details,
|
|
|
- notify_files, notify_teacher, notify_stu, creator
|
|
|
+ notify_files, notify_teacher, notify_stu, creator,
|
|
|
+ accessory
|
|
|
)
|
|
|
values (#{notify_id,jdbcType=BIGINT}, #{notify_title,jdbcType=VARCHAR}, #{notify_type,jdbcType=INTEGER},
|
|
|
#{notify_creator,jdbcType=BIGINT}, #{create_date,jdbcType=TIMESTAMP}, #{notify_status,jdbcType=INTEGER},
|
|
|
#{notify_remarks,jdbcType=VARCHAR}, #{school_id,jdbcType=BIGINT}, #{notify_details,jdbcType=LONGVARCHAR},
|
|
|
#{notify_files,jdbcType=LONGVARCHAR}, #{notify_teacher,jdbcType=LONGVARCHAR}, #{notify_stu,jdbcType=LONGVARCHAR},
|
|
|
- #{creator,jdbcType=VARCHAR}
|
|
|
+ #{creator,jdbcType=VARCHAR}, #{accessory,jdbcType=VARCHAR}
|
|
|
)
|
|
|
</insert>
|
|
|
- <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.Notify" >
|
|
|
- <selectKey resultType="java.lang.Long" keyProperty="notify_id">
|
|
|
- SELECT LAST_INSERT_ID() AS ID
|
|
|
- </selectKey>
|
|
|
- insert into notify
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
- <if test="notify_title != null" >
|
|
|
- notify_title,
|
|
|
- </if>
|
|
|
- <if test="notify_type != null" >
|
|
|
- notify_type,
|
|
|
- </if>
|
|
|
- <if test="notify_creator != null" >
|
|
|
- notify_creator,
|
|
|
- </if>
|
|
|
- <if test="create_date != null" >
|
|
|
- create_date,
|
|
|
- </if>
|
|
|
- <if test="notify_status != null" >
|
|
|
- notify_status,
|
|
|
- </if>
|
|
|
- <if test="notify_remarks != null" >
|
|
|
- notify_remarks,
|
|
|
- </if>
|
|
|
- <if test="school_id != null" >
|
|
|
- school_id,
|
|
|
- </if>
|
|
|
- <if test="notify_details != null" >
|
|
|
- notify_details,
|
|
|
- </if>
|
|
|
- <if test="notify_files != null" >
|
|
|
- notify_files,
|
|
|
- </if>
|
|
|
- <if test="notify_teacher != null" >
|
|
|
- notify_teacher,
|
|
|
- </if>
|
|
|
- <if test="notify_stu != null" >
|
|
|
- notify_stu,
|
|
|
- </if>
|
|
|
- <if test="creator != null" >
|
|
|
- creator,
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
- <if test="notify_title != null" >
|
|
|
- #{notify_title,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="notify_type != null" >
|
|
|
- #{notify_type,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="notify_creator != null" >
|
|
|
- #{notify_creator,jdbcType=BIGINT},
|
|
|
- </if>
|
|
|
- <if test="create_date != null" >
|
|
|
- #{create_date,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="notify_status != null" >
|
|
|
- #{notify_status,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="notify_remarks != null" >
|
|
|
- #{notify_remarks,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="school_id != null" >
|
|
|
- #{school_id,jdbcType=BIGINT},
|
|
|
- </if>
|
|
|
- <if test="notify_details != null" >
|
|
|
- #{notify_details,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- <if test="notify_files != null" >
|
|
|
- #{notify_files,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- <if test="notify_teacher != null" >
|
|
|
- #{notify_teacher,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- <if test="notify_stu != null" >
|
|
|
- #{notify_stu,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- <if test="creator != null" >
|
|
|
- #{creator,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.Notify" >
|
|
|
- update notify
|
|
|
- <set >
|
|
|
- <if test="notify_title != null" >
|
|
|
- notify_title = #{notify_title,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="notify_type != null" >
|
|
|
- notify_type = #{notify_type,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="notify_creator != null" >
|
|
|
- notify_creator = #{notify_creator,jdbcType=BIGINT},
|
|
|
- </if>
|
|
|
- <if test="create_date != null" >
|
|
|
- create_date = #{create_date,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="notify_status != null" >
|
|
|
- notify_status = #{notify_status,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="notify_remarks != null" >
|
|
|
- notify_remarks = #{notify_remarks,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="school_id != null" >
|
|
|
- school_id = #{school_id,jdbcType=BIGINT},
|
|
|
- </if>
|
|
|
- <if test="notify_details != null" >
|
|
|
- notify_details = #{notify_details,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- <if test="notify_files != null" >
|
|
|
- notify_files = #{notify_files,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- <if test="notify_teacher != null" >
|
|
|
- notify_teacher = #{notify_teacher,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- <if test="notify_stu != null" >
|
|
|
- notify_stu = #{notify_stu,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- <if test="creator != null" >
|
|
|
- creator = #{creator,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- where notify_id = #{notify_id,jdbcType=BIGINT}
|
|
|
- </update>
|
|
|
- <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.smartschool.school.po.Notify" >
|
|
|
+ <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.Notify">
|
|
|
+ <selectKey resultType="java.lang.Long" keyProperty="notify_id">
|
|
|
+ SELECT LAST_INSERT_ID() AS ID
|
|
|
+ </selectKey>
|
|
|
+ insert into notify
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="notify_title != null">
|
|
|
+ notify_title,
|
|
|
+ </if>
|
|
|
+ <if test="notify_type != null">
|
|
|
+ notify_type,
|
|
|
+ </if>
|
|
|
+ <if test="notify_creator != null">
|
|
|
+ notify_creator,
|
|
|
+ </if>
|
|
|
+ <if test="create_date != null">
|
|
|
+ create_date,
|
|
|
+ </if>
|
|
|
+ <if test="notify_status != null">
|
|
|
+ notify_status,
|
|
|
+ </if>
|
|
|
+ <if test="notify_remarks != null">
|
|
|
+ notify_remarks,
|
|
|
+ </if>
|
|
|
+ <if test="school_id != null">
|
|
|
+ school_id,
|
|
|
+ </if>
|
|
|
+ <if test="notify_details != null">
|
|
|
+ notify_details,
|
|
|
+ </if>
|
|
|
+ <if test="notify_files != null">
|
|
|
+ notify_files,
|
|
|
+ </if>
|
|
|
+ <if test="notify_teacher != null">
|
|
|
+ notify_teacher,
|
|
|
+ </if>
|
|
|
+ <if test="notify_stu != null">
|
|
|
+ notify_stu,
|
|
|
+ </if>
|
|
|
+ <if test="creator != null">
|
|
|
+ creator,
|
|
|
+ </if>
|
|
|
+ <if test="creator != null">
|
|
|
+ accessory,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="notify_title != null">
|
|
|
+ #{notify_title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="notify_type != null">
|
|
|
+ #{notify_type,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="notify_creator != null">
|
|
|
+ #{notify_creator,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="create_date != null">
|
|
|
+ #{create_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="notify_status != null">
|
|
|
+ #{notify_status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="notify_remarks != null">
|
|
|
+ #{notify_remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="school_id != null">
|
|
|
+ #{school_id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="notify_details != null">
|
|
|
+ #{notify_details,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="notify_files != null">
|
|
|
+ #{notify_files,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="notify_teacher != null">
|
|
|
+ #{notify_teacher,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="notify_stu != null">
|
|
|
+ #{notify_stu,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="creator != null">
|
|
|
+ #{creator,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="accessory != null">
|
|
|
+ #{accessory,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.Notify">
|
|
|
+ update notify
|
|
|
+ <set>
|
|
|
+ <if test="notify_title != null">
|
|
|
+ notify_title = #{notify_title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="notify_type != null">
|
|
|
+ notify_type = #{notify_type,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="notify_creator != null">
|
|
|
+ notify_creator = #{notify_creator,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="create_date != null">
|
|
|
+ create_date = #{create_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="notify_status != null">
|
|
|
+ notify_status = #{notify_status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="notify_remarks != null">
|
|
|
+ notify_remarks = #{notify_remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="school_id != null">
|
|
|
+ school_id = #{school_id,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="notify_details != null">
|
|
|
+ notify_details = #{notify_details,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="notify_files != null">
|
|
|
+ notify_files = #{notify_files,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="notify_teacher != null">
|
|
|
+ notify_teacher = #{notify_teacher,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="notify_stu != null">
|
|
|
+ notify_stu = #{notify_stu,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="creator != null">
|
|
|
+ creator = #{creator,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="accessory != null">
|
|
|
+ accessory = #{accessory,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where notify_id = #{notify_id,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.smartschool.school.po.Notify">
|
|
|
update notify
|
|
|
set notify_title = #{notify_title,jdbcType=VARCHAR},
|
|
|
notify_type = #{notify_type,jdbcType=INTEGER},
|
|
|
@@ -177,9 +188,10 @@
|
|
|
notify_teacher = #{notify_teacher,jdbcType=LONGVARCHAR},
|
|
|
notify_stu = #{notify_stu,jdbcType=LONGVARCHAR},
|
|
|
creator = #{creator,jdbcType=VARCHAR}
|
|
|
+ accessory = #{accessory,jdbcType=VARCHAR}
|
|
|
where notify_id = #{notify_id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.Notify" >
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.Notify">
|
|
|
update notify
|
|
|
set notify_title = #{notify_title,jdbcType=VARCHAR},
|
|
|
notify_type = #{notify_type,jdbcType=INTEGER},
|
|
|
@@ -191,19 +203,19 @@
|
|
|
where notify_id = #{notify_id,jdbcType=BIGINT}
|
|
|
</update>
|
|
|
|
|
|
- <select id="selectByConditon" resultMap="BaseResultMap">
|
|
|
- select * from notify
|
|
|
- <where>
|
|
|
- <if test="con != null">
|
|
|
- ${con}
|
|
|
- </if>
|
|
|
- <if test="school_id != null">
|
|
|
- and school_id=#{school_id}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- ORDER BY notify_id DESC
|
|
|
- </select>
|
|
|
- <update id="updateByPublish" parameterType="java.lang.Long">
|
|
|
+ <select id="selectByConditon" resultMap="BaseResultMap">
|
|
|
+ select * from notify
|
|
|
+ <where>
|
|
|
+ <if test="con != null">
|
|
|
+ ${con}
|
|
|
+ </if>
|
|
|
+ <if test="school_id != null">
|
|
|
+ and school_id=#{school_id}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY notify_id DESC
|
|
|
+ </select>
|
|
|
+ <update id="updateByPublish" parameterType="java.lang.Long">
|
|
|
update notify
|
|
|
set notify_status = 1 ,
|
|
|
publish_date = now()
|