|
@@ -0,0 +1,235 @@
|
|
|
|
+<?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.book.dao.cps.mapper.WechatAutoreplyMapper">
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.book.dao.cps.pojo.WechatAutoreply">
|
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
|
+ <result column="admin_id" jdbcType="INTEGER" property="adminId" />
|
|
|
|
+ <result column="title" jdbcType="VARCHAR" property="title" />
|
|
|
|
+ <result column="text" jdbcType="VARCHAR" property="text" />
|
|
|
|
+ <result column="eventkey" jdbcType="VARCHAR" property="eventkey" />
|
|
|
|
+ <result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
|
+ <result column="createtime" jdbcType="INTEGER" property="createtime" />
|
|
|
|
+ <result column="updatetime" jdbcType="INTEGER" property="updatetime" />
|
|
|
|
+ <result column="status" jdbcType="VARCHAR" property="status" />
|
|
|
|
+ <result column="type" jdbcType="VARCHAR" property="type" />
|
|
|
|
+ <result column="text_tip_word" jdbcType="VARCHAR" property="textTipWord" />
|
|
|
|
+ <result column="text_content" jdbcType="VARCHAR" property="textContent" />
|
|
|
|
+ <result column="news_content" jdbcType="VARCHAR" property="newsContent" />
|
|
|
|
+ <result column="event_keys" jdbcType="VARCHAR" property="eventKeys" />
|
|
|
|
+ <result column="books" jdbcType="VARCHAR" property="books" />
|
|
|
|
+ <result column="pid" jdbcType="INTEGER" property="pid" />
|
|
|
|
+ <result column="test" jdbcType="INTEGER" property="test" />
|
|
|
|
+ </resultMap>
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
+ id, admin_id, title, `text`, eventkey, remark, createtime, updatetime, `status`,
|
|
|
|
+ `type`, text_tip_word, text_content, news_content, event_keys, books, pid, test
|
|
|
|
+ </sql>
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
|
+ from wechat_autoreply
|
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="selectByText" resultMap="BaseResultMap">
|
|
|
|
+ select * from wechat_autoreply where text = #{text}
|
|
|
|
+
|
|
|
|
+ </select>
|
|
|
|
+ <select id="selectByAdminIdAndText" resultMap="BaseResultMap">
|
|
|
|
+ select * from wechat_autoreply where admin_id = #{admin_id} and text = #{text}
|
|
|
|
+</select>
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
+ delete from wechat_autoreply
|
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
|
+ </delete>
|
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.book.dao.cps.pojo.WechatAutoreply" useGeneratedKeys="true">
|
|
|
|
+ insert into wechat_autoreply (admin_id, title, `text`,
|
|
|
|
+ eventkey, remark, createtime,
|
|
|
|
+ updatetime, `status`, `type`,
|
|
|
|
+ text_tip_word, text_content, news_content,
|
|
|
|
+ event_keys, books, pid,
|
|
|
|
+ test)
|
|
|
|
+ values (#{adminId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{text,jdbcType=VARCHAR},
|
|
|
|
+ #{eventkey,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=INTEGER},
|
|
|
|
+ #{updatetime,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
|
|
|
+ #{textTipWord,jdbcType=VARCHAR}, #{textContent,jdbcType=VARCHAR}, #{newsContent,jdbcType=VARCHAR},
|
|
|
|
+ #{eventKeys,jdbcType=VARCHAR}, #{books,jdbcType=VARCHAR}, #{pid,jdbcType=INTEGER},
|
|
|
|
+ #{test,jdbcType=INTEGER})
|
|
|
|
+ </insert>
|
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.book.dao.cps.pojo.WechatAutoreply" useGeneratedKeys="true">
|
|
|
|
+ insert into wechat_autoreply
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="adminId != null">
|
|
|
|
+ admin_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="title != null">
|
|
|
|
+ title,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="text != null">
|
|
|
|
+ `text`,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="eventkey != null">
|
|
|
|
+ eventkey,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null">
|
|
|
|
+ remark,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ createtime,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ updatetime,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ `status`,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="type != null">
|
|
|
|
+ `type`,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="textTipWord != null">
|
|
|
|
+ text_tip_word,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="textContent != null">
|
|
|
|
+ text_content,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newsContent != null">
|
|
|
|
+ news_content,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="eventKeys != null">
|
|
|
|
+ event_keys,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="books != null">
|
|
|
|
+ books,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="pid != null">
|
|
|
|
+ pid,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="test != null">
|
|
|
|
+ test,
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="adminId != null">
|
|
|
|
+ #{adminId,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="title != null">
|
|
|
|
+ #{title,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="text != null">
|
|
|
|
+ #{text,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="eventkey != null">
|
|
|
|
+ #{eventkey,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null">
|
|
|
|
+ #{remark,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ #{createtime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ #{updatetime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ #{status,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="type != null">
|
|
|
|
+ #{type,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="textTipWord != null">
|
|
|
|
+ #{textTipWord,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="textContent != null">
|
|
|
|
+ #{textContent,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newsContent != null">
|
|
|
|
+ #{newsContent,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="eventKeys != null">
|
|
|
|
+ #{eventKeys,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="books != null">
|
|
|
|
+ #{books,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="pid != null">
|
|
|
|
+ #{pid,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="test != null">
|
|
|
|
+ #{test,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.book.dao.cps.pojo.WechatAutoreply">
|
|
|
|
+ update wechat_autoreply
|
|
|
|
+ <set>
|
|
|
|
+ <if test="adminId != null">
|
|
|
|
+ admin_id = #{adminId,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="title != null">
|
|
|
|
+ title = #{title,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="text != null">
|
|
|
|
+ `text` = #{text,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="eventkey != null">
|
|
|
|
+ eventkey = #{eventkey,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remark != null">
|
|
|
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ createtime = #{createtime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ updatetime = #{updatetime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ `status` = #{status,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="type != null">
|
|
|
|
+ `type` = #{type,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="textTipWord != null">
|
|
|
|
+ text_tip_word = #{textTipWord,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="textContent != null">
|
|
|
|
+ text_content = #{textContent,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newsContent != null">
|
|
|
|
+ news_content = #{newsContent,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="eventKeys != null">
|
|
|
|
+ event_keys = #{eventKeys,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="books != null">
|
|
|
|
+ books = #{books,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="pid != null">
|
|
|
|
+ pid = #{pid,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="test != null">
|
|
|
|
+ test = #{test,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
|
+ </update>
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.book.dao.cps.pojo.WechatAutoreply">
|
|
|
|
+ update wechat_autoreply
|
|
|
|
+ set admin_id = #{adminId,jdbcType=INTEGER},
|
|
|
|
+ title = #{title,jdbcType=VARCHAR},
|
|
|
|
+ `text` = #{text,jdbcType=VARCHAR},
|
|
|
|
+ eventkey = #{eventkey,jdbcType=VARCHAR},
|
|
|
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
|
+ createtime = #{createtime,jdbcType=INTEGER},
|
|
|
|
+ updatetime = #{updatetime,jdbcType=INTEGER},
|
|
|
|
+ `status` = #{status,jdbcType=VARCHAR},
|
|
|
|
+ `type` = #{type,jdbcType=VARCHAR},
|
|
|
|
+ text_tip_word = #{textTipWord,jdbcType=VARCHAR},
|
|
|
|
+ text_content = #{textContent,jdbcType=VARCHAR},
|
|
|
|
+ news_content = #{newsContent,jdbcType=VARCHAR},
|
|
|
|
+ event_keys = #{eventKeys,jdbcType=VARCHAR},
|
|
|
|
+ books = #{books,jdbcType=VARCHAR},
|
|
|
|
+ pid = #{pid,jdbcType=INTEGER},
|
|
|
|
+ test = #{test,jdbcType=INTEGER}
|
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
|
+ </update>
|
|
|
|
+</mapper>
|