|
@@ -0,0 +1,391 @@
|
|
|
+<?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.idea.message.mapper.MessageInfoMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.idea.message.model.SysMessageInfo">
|
|
|
+ <id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
+ <result column="title" jdbcType="VARCHAR" property="title" />
|
|
|
+ <result column="version_no" jdbcType="VARCHAR" property="versionNo" />
|
|
|
+ <result column="push_by" jdbcType="VARCHAR" property="pushBy" />
|
|
|
+ <result column="push_name" jdbcType="VARCHAR" property="pushName" />
|
|
|
+ <result column="push_time" jdbcType="TIMESTAMP" property="pushTime" />
|
|
|
+ <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
|
|
+ <result column="update_name" jdbcType="VARCHAR" property="updateName" />
|
|
|
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
|
+ <result column="create_name" jdbcType="VARCHAR" property="createName" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="state" jdbcType="VARCHAR" property="state" />
|
|
|
+ <result column="annex" jdbcType="VARCHAR" property="annex" />
|
|
|
+ <result column="push_state" jdbcType="VARCHAR" property="pushState" />
|
|
|
+ <result column="content" jdbcType="VARCHAR" property="content" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Update_By_Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, title, version_no, push_by, push_name, push_time, update_by, update_name, update_time,
|
|
|
+ create_by, create_name, create_time, state, annex, push_state, content
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExample" parameterType="com.idea.message.model.SysMessageInfoExample" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from sys_message_info
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from sys_message_info
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ delete from sys_message_info
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.idea.message.model.SysMessageInfoExample">
|
|
|
+ delete from sys_message_info
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.idea.message.model.SysMessageInfo">
|
|
|
+ <selectKey keyProperty="id" order="AFTER" resultType="java.lang.String">
|
|
|
+ SELECT LAST_INSERT_ID()
|
|
|
+ </selectKey>
|
|
|
+ insert into sys_message_info (id, title, version_no, push_by,
|
|
|
+ push_name, push_time, update_by,
|
|
|
+ update_name, update_time, create_by,
|
|
|
+ create_name, create_time, state,
|
|
|
+ annex, push_state, content
|
|
|
+ )
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{versionNo,jdbcType=VARCHAR}, #{pushBy,jdbcType=VARCHAR},
|
|
|
+ #{pushName,jdbcType=VARCHAR}, #{pushTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
|
|
|
+ #{updateName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR},
|
|
|
+ #{createName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{state,jdbcType=VARCHAR},
|
|
|
+ #{annex,jdbcType=VARCHAR}, #{pushState,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.idea.message.model.SysMessageInfo">
|
|
|
+ <selectKey keyProperty="id" order="AFTER" resultType="java.lang.String">
|
|
|
+ SELECT LAST_INSERT_ID()
|
|
|
+ </selectKey>
|
|
|
+ insert into sys_message_info
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="title != null">
|
|
|
+ title,
|
|
|
+ </if>
|
|
|
+ <if test="versionNo != null">
|
|
|
+ version_no,
|
|
|
+ </if>
|
|
|
+ <if test="pushBy != null">
|
|
|
+ push_by,
|
|
|
+ </if>
|
|
|
+ <if test="pushName != null">
|
|
|
+ push_name,
|
|
|
+ </if>
|
|
|
+ <if test="pushTime != null">
|
|
|
+ push_time,
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ update_by,
|
|
|
+ </if>
|
|
|
+ <if test="updateName != null">
|
|
|
+ update_name,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time,
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ create_by,
|
|
|
+ </if>
|
|
|
+ <if test="createName != null">
|
|
|
+ create_name,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ state,
|
|
|
+ </if>
|
|
|
+ <if test="annex != null">
|
|
|
+ annex,
|
|
|
+ </if>
|
|
|
+ <if test="pushState != null">
|
|
|
+ push_state,
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ content,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="title != null">
|
|
|
+ #{title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="versionNo != null">
|
|
|
+ #{versionNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pushBy != null">
|
|
|
+ #{pushBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pushName != null">
|
|
|
+ #{pushName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pushTime != null">
|
|
|
+ #{pushTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ #{updateBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateName != null">
|
|
|
+ #{updateName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ #{createBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createName != null">
|
|
|
+ #{createName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ #{state,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="annex != null">
|
|
|
+ #{annex,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pushState != null">
|
|
|
+ #{pushState,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ #{content,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.idea.message.model.SysMessageInfoExample" resultType="java.lang.Long">
|
|
|
+ select count(*) from sys_message_info
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ update sys_message_info
|
|
|
+ <set>
|
|
|
+ <if test="record.id != null">
|
|
|
+ id = #{record.id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.title != null">
|
|
|
+ title = #{record.title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.versionNo != null">
|
|
|
+ version_no = #{record.versionNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.pushBy != null">
|
|
|
+ push_by = #{record.pushBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.pushName != null">
|
|
|
+ push_name = #{record.pushName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.pushTime != null">
|
|
|
+ push_time = #{record.pushTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.updateBy != null">
|
|
|
+ update_by = #{record.updateBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.updateName != null">
|
|
|
+ update_name = #{record.updateName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.updateTime != null">
|
|
|
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.createBy != null">
|
|
|
+ create_by = #{record.createBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.createName != null">
|
|
|
+ create_name = #{record.createName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.createTime != null">
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.state != null">
|
|
|
+ state = #{record.state,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.annex != null">
|
|
|
+ annex = #{record.annex,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.pushState != null">
|
|
|
+ push_state = #{record.pushState,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.content != null">
|
|
|
+ content = #{record.content,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ update sys_message_info
|
|
|
+ set id = #{record.id,jdbcType=VARCHAR},
|
|
|
+ title = #{record.title,jdbcType=VARCHAR},
|
|
|
+ version_no = #{record.versionNo,jdbcType=VARCHAR},
|
|
|
+ push_by = #{record.pushBy,jdbcType=VARCHAR},
|
|
|
+ push_name = #{record.pushName,jdbcType=VARCHAR},
|
|
|
+ push_time = #{record.pushTime,jdbcType=TIMESTAMP},
|
|
|
+ update_by = #{record.updateBy,jdbcType=VARCHAR},
|
|
|
+ update_name = #{record.updateName,jdbcType=VARCHAR},
|
|
|
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
+ create_by = #{record.createBy,jdbcType=VARCHAR},
|
|
|
+ create_name = #{record.createName,jdbcType=VARCHAR},
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ state = #{record.state,jdbcType=VARCHAR},
|
|
|
+ annex = #{record.annex,jdbcType=VARCHAR},
|
|
|
+ push_state = #{record.pushState,jdbcType=VARCHAR},
|
|
|
+ content = #{record.content,jdbcType=VARCHAR}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.idea.message.model.SysMessageInfo">
|
|
|
+ update sys_message_info
|
|
|
+ <set>
|
|
|
+ <if test="title != null">
|
|
|
+ title = #{title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="versionNo != null">
|
|
|
+ version_no = #{versionNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pushBy != null">
|
|
|
+ push_by = #{pushBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pushName != null">
|
|
|
+ push_name = #{pushName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pushTime != null">
|
|
|
+ push_time = #{pushTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateName != null">
|
|
|
+ update_name = #{updateName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createName != null">
|
|
|
+ create_name = #{createName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ state = #{state,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="annex != null">
|
|
|
+ annex = #{annex,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pushState != null">
|
|
|
+ push_state = #{pushState,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ content = #{content,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.idea.message.model.SysMessageInfo">
|
|
|
+ update sys_message_info
|
|
|
+ set title = #{title,jdbcType=VARCHAR},
|
|
|
+ version_no = #{versionNo,jdbcType=VARCHAR},
|
|
|
+ push_by = #{pushBy,jdbcType=VARCHAR},
|
|
|
+ push_name = #{pushName,jdbcType=VARCHAR},
|
|
|
+ push_time = #{pushTime,jdbcType=TIMESTAMP},
|
|
|
+ update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
+ update_name = #{updateName,jdbcType=VARCHAR},
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
+ create_name = #{createName,jdbcType=VARCHAR},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ state = #{state,jdbcType=VARCHAR},
|
|
|
+ annex = #{annex,jdbcType=VARCHAR},
|
|
|
+ push_state = #{pushState,jdbcType=VARCHAR},
|
|
|
+ content = #{content,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+</mapper>
|