|
@@ -1,157 +1,160 @@
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.book.dao.polardb.mapper.UserSilentMapper">
|
|
<mapper namespace="com.book.dao.polardb.mapper.UserSilentMapper">
|
|
- <resultMap id="BaseResultMap" type="com.book.dao.polardb.pojo.UserSilent">
|
|
|
|
- <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
|
- <result column="user_id" jdbcType="BIGINT" property="userId" />
|
|
|
|
- <result column="channel_id" jdbcType="INTEGER" property="channelId" />
|
|
|
|
- <result column="openid" jdbcType="VARCHAR" property="openid" />
|
|
|
|
- <result column="tri_channel_id" jdbcType="INTEGER" property="triChannelId" />
|
|
|
|
- <result column="tri_openid" jdbcType="VARCHAR" property="triOpenid" />
|
|
|
|
- <result column="tri_appid" jdbcType="VARCHAR" property="triAppid" />
|
|
|
|
- <result column="updatetime" jdbcType="INTEGER" property="updatetime" />
|
|
|
|
- <result column="createtime" jdbcType="INTEGER" property="createtime" />
|
|
|
|
- </resultMap>
|
|
|
|
- <sql id="Base_Column_List">
|
|
|
|
- id, user_id, channel_id, openid, tri_channel_id, tri_openid, tri_appid, updatetime,
|
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.book.dao.polardb.pojo.UserSilent">
|
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id"/>
|
|
|
|
+ <result column="user_id" jdbcType="BIGINT" property="userId"/>
|
|
|
|
+ <result column="channel_id" jdbcType="INTEGER" property="channelId"/>
|
|
|
|
+ <result column="openid" jdbcType="VARCHAR" property="openid"/>
|
|
|
|
+ <result column="tri_channel_id" jdbcType="INTEGER" property="triChannelId"/>
|
|
|
|
+ <result column="tri_openid" jdbcType="VARCHAR" property="triOpenid"/>
|
|
|
|
+ <result column="tri_appid" jdbcType="VARCHAR" property="triAppid"/>
|
|
|
|
+ <result column="updatetime" jdbcType="INTEGER" property="updatetime"/>
|
|
|
|
+ <result column="createtime" jdbcType="INTEGER" property="createtime"/>
|
|
|
|
+ </resultMap>
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
+ id, user_id, channel_id, openid, tri_channel_id, tri_openid, tri_appid, updatetime,
|
|
createtime
|
|
createtime
|
|
- </sql>
|
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
|
- select
|
|
|
|
- <include refid="Base_Column_List" />
|
|
|
|
- from user_silent
|
|
|
|
- where id = #{id,jdbcType=BIGINT}
|
|
|
|
- </select>
|
|
|
|
|
|
+ </sql>
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
+ from user_silent
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </select>
|
|
<select id="selectByUserSlient" resultType="com.book.dao.polardb.pojo.UserSilent">
|
|
<select id="selectByUserSlient" resultType="com.book.dao.polardb.pojo.UserSilent">
|
|
- select * from user_silent
|
|
|
|
- <trim prefix="WHERE" prefixOverrides="AND | OR">
|
|
|
|
- <if test="user_id!=null and user_id!=''">
|
|
|
|
- and user_id != #{user_id}
|
|
|
|
- </if>
|
|
|
|
- <if test="channel_id!=null and channel_id!=''">
|
|
|
|
- and channel_id != #{channel_id}
|
|
|
|
- </if>
|
|
|
|
- <if test="openid!=null and openid!=0">
|
|
|
|
- and openid != #{openid}
|
|
|
|
- </if>
|
|
|
|
- <if test="tri_appid!=null and tri_appid!=0">
|
|
|
|
- and tri_appid != #{tri_appid}
|
|
|
|
- </if>
|
|
|
|
- <if test="tri_openid!=null and tri_openid!=0">
|
|
|
|
- and tri_openid != #{tri_openid}
|
|
|
|
- </if>
|
|
|
|
-
|
|
|
|
|
|
+ select * from user_silent
|
|
|
|
+ <trim prefix="WHERE" prefixOverrides="AND | OR">
|
|
|
|
+ <if test="userId!=null and userId!=''">
|
|
|
|
+ and user_id = #{userId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="channelId!=null and channelId!=''">
|
|
|
|
+ and channel_id = #{channelId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="openid!=null and openid!=''">
|
|
|
|
+ and openid = #{openid}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="triOpenid!=null and triOpenid!=''">
|
|
|
|
+ and tri_openid = #{triOpenid}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="triAppid!=null and triAppid!=''">
|
|
|
|
+ and tri_appid = #{triAppid}
|
|
|
|
+ </if>
|
|
|
|
|
|
- </trim>
|
|
|
|
|
|
|
|
|
|
+ </trim>
|
|
|
|
+ limit 1
|
|
</select>
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
- delete from user_silent
|
|
|
|
- where id = #{id,jdbcType=BIGINT}
|
|
|
|
- </delete>
|
|
|
|
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.book.dao.polardb.pojo.UserSilent" useGeneratedKeys="true">
|
|
|
|
- insert into user_silent (user_id, channel_id, openid,
|
|
|
|
- tri_channel_id, tri_openid, tri_appid,
|
|
|
|
- updatetime, createtime)
|
|
|
|
- values (#{userId,jdbcType=BIGINT}, #{channelId,jdbcType=INTEGER}, #{openid,jdbcType=VARCHAR},
|
|
|
|
- #{triChannelId,jdbcType=INTEGER}, #{triOpenid,jdbcType=VARCHAR}, #{triAppid,jdbcType=VARCHAR},
|
|
|
|
- #{updatetime,jdbcType=INTEGER}, #{createtime,jdbcType=INTEGER})
|
|
|
|
- </insert>
|
|
|
|
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.book.dao.polardb.pojo.UserSilent" useGeneratedKeys="true">
|
|
|
|
- insert into user_silent
|
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
- <if test="userId != null">
|
|
|
|
- user_id,
|
|
|
|
- </if>
|
|
|
|
- <if test="channelId != null">
|
|
|
|
- channel_id,
|
|
|
|
- </if>
|
|
|
|
- <if test="openid != null">
|
|
|
|
- openid,
|
|
|
|
- </if>
|
|
|
|
- <if test="triChannelId != null">
|
|
|
|
- tri_channel_id,
|
|
|
|
- </if>
|
|
|
|
- <if test="triOpenid != null">
|
|
|
|
- tri_openid,
|
|
|
|
- </if>
|
|
|
|
- <if test="triAppid != null">
|
|
|
|
- tri_appid,
|
|
|
|
- </if>
|
|
|
|
- <if test="updatetime != null">
|
|
|
|
- updatetime,
|
|
|
|
- </if>
|
|
|
|
- <if test="createtime != null">
|
|
|
|
- createtime,
|
|
|
|
- </if>
|
|
|
|
- </trim>
|
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
- <if test="userId != null">
|
|
|
|
- #{userId,jdbcType=BIGINT},
|
|
|
|
- </if>
|
|
|
|
- <if test="channelId != null">
|
|
|
|
- #{channelId,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="openid != null">
|
|
|
|
- #{openid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="triChannelId != null">
|
|
|
|
- #{triChannelId,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="triOpenid != null">
|
|
|
|
- #{triOpenid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="triAppid != null">
|
|
|
|
- #{triAppid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="updatetime != null">
|
|
|
|
- #{updatetime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="createtime != null">
|
|
|
|
- #{createtime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- </trim>
|
|
|
|
- </insert>
|
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.book.dao.polardb.pojo.UserSilent">
|
|
|
|
- update user_silent
|
|
|
|
- <set>
|
|
|
|
- <if test="userId != null">
|
|
|
|
- user_id = #{userId,jdbcType=BIGINT},
|
|
|
|
- </if>
|
|
|
|
- <if test="channelId != null">
|
|
|
|
- channel_id = #{channelId,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="openid != null">
|
|
|
|
- openid = #{openid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="triChannelId != null">
|
|
|
|
- tri_channel_id = #{triChannelId,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="triOpenid != null">
|
|
|
|
- tri_openid = #{triOpenid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="triAppid != null">
|
|
|
|
- tri_appid = #{triAppid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="updatetime != null">
|
|
|
|
- updatetime = #{updatetime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="createtime != null">
|
|
|
|
- createtime = #{createtime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- </set>
|
|
|
|
- where id = #{id,jdbcType=BIGINT}
|
|
|
|
- </update>
|
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.book.dao.polardb.pojo.UserSilent">
|
|
|
|
- update user_silent
|
|
|
|
- set user_id = #{userId,jdbcType=BIGINT},
|
|
|
|
- channel_id = #{channelId,jdbcType=INTEGER},
|
|
|
|
- openid = #{openid,jdbcType=VARCHAR},
|
|
|
|
- tri_channel_id = #{triChannelId,jdbcType=INTEGER},
|
|
|
|
- tri_openid = #{triOpenid,jdbcType=VARCHAR},
|
|
|
|
- tri_appid = #{triAppid,jdbcType=VARCHAR},
|
|
|
|
- updatetime = #{updatetime,jdbcType=INTEGER},
|
|
|
|
- createtime = #{createtime,jdbcType=INTEGER}
|
|
|
|
- where id = #{id,jdbcType=BIGINT}
|
|
|
|
- </update>
|
|
|
|
|
|
+ delete
|
|
|
|
+ from user_silent
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </delete>
|
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.book.dao.polardb.pojo.UserSilent"
|
|
|
|
+ useGeneratedKeys="true">
|
|
|
|
+ insert into user_silent (user_id, channel_id, openid,
|
|
|
|
+ tri_channel_id, tri_openid, tri_appid,
|
|
|
|
+ updatetime, createtime)
|
|
|
|
+ values (#{userId,jdbcType=BIGINT}, #{channelId,jdbcType=INTEGER}, #{openid,jdbcType=VARCHAR},
|
|
|
|
+ #{triChannelId,jdbcType=INTEGER}, #{triOpenid,jdbcType=VARCHAR}, #{triAppid,jdbcType=VARCHAR},
|
|
|
|
+ #{updatetime,jdbcType=INTEGER}, #{createtime,jdbcType=INTEGER})
|
|
|
|
+ </insert>
|
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.book.dao.polardb.pojo.UserSilent"
|
|
|
|
+ useGeneratedKeys="true">
|
|
|
|
+ insert into user_silent
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="userId != null">
|
|
|
|
+ user_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="channelId != null">
|
|
|
|
+ channel_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="openid != null">
|
|
|
|
+ openid,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="triChannelId != null">
|
|
|
|
+ tri_channel_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="triOpenid != null">
|
|
|
|
+ tri_openid,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="triAppid != null">
|
|
|
|
+ tri_appid,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ updatetime,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ createtime,
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="userId != null">
|
|
|
|
+ #{userId,jdbcType=BIGINT},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="channelId != null">
|
|
|
|
+ #{channelId,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="openid != null">
|
|
|
|
+ #{openid,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="triChannelId != null">
|
|
|
|
+ #{triChannelId,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="triOpenid != null">
|
|
|
|
+ #{triOpenid,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="triAppid != null">
|
|
|
|
+ #{triAppid,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ #{updatetime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ #{createtime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.book.dao.polardb.pojo.UserSilent">
|
|
|
|
+ update user_silent
|
|
|
|
+ <set>
|
|
|
|
+ <if test="userId != null">
|
|
|
|
+ user_id = #{userId,jdbcType=BIGINT},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="channelId != null">
|
|
|
|
+ channel_id = #{channelId,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="openid != null">
|
|
|
|
+ openid = #{openid,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="triChannelId != null">
|
|
|
|
+ tri_channel_id = #{triChannelId,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="triOpenid != null">
|
|
|
|
+ tri_openid = #{triOpenid,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="triAppid != null">
|
|
|
|
+ tri_appid = #{triAppid,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ updatetime = #{updatetime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ createtime = #{createtime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </update>
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.book.dao.polardb.pojo.UserSilent">
|
|
|
|
+ update user_silent
|
|
|
|
+ set user_id = #{userId,jdbcType=BIGINT},
|
|
|
|
+ channel_id = #{channelId,jdbcType=INTEGER},
|
|
|
|
+ openid = #{openid,jdbcType=VARCHAR},
|
|
|
|
+ tri_channel_id = #{triChannelId,jdbcType=INTEGER},
|
|
|
|
+ tri_openid = #{triOpenid,jdbcType=VARCHAR},
|
|
|
|
+ tri_appid = #{triAppid,jdbcType=VARCHAR},
|
|
|
|
+ updatetime = #{updatetime,jdbcType=INTEGER},
|
|
|
|
+ createtime = #{createtime,jdbcType=INTEGER}
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </update>
|
|
</mapper>
|
|
</mapper>
|