<?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.ks.daylucky.mapper.UserInfoExtraMapper">
|
<resultMap id="BaseResultMap" type="com.ks.daylucky.pojo.DO.UserInfoExtra">
|
<id column="uid" property="uid" jdbcType="BIGINT"/>
|
<result column="msg_setting" property="msgSetting" jdbcType="VARCHAR"/>
|
<result column="msg_unread_count" property="msgUnreadCount" jdbcType="INTEGER"/>
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
</resultMap>
|
<sql id="Base_Column_List">
|
uid, msg_setting, msg_unread_count, create_time, update_time
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List"/>
|
from user_info_extra
|
where uid = #{0}
|
</select>
|
|
<select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List"/>
|
from user_info_extra
|
where uid = #{0} for update
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
delete from user_info_extra
|
where uid = #{0}
|
</delete>
|
<insert id="insert" parameterType="com.ks.daylucky.pojo.DO.UserInfoExtra">
|
insert into user_info_extra (uid, msg_setting, msg_unread_count,
|
create_time, update_time)
|
values (#{uid,jdbcType=BIGINT}, #{msgSetting,jdbcType=VARCHAR}, #{msgUnreadCount,jdbcType=INTEGER},
|
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
|
</insert>
|
<insert id="insertSelective"
|
parameterType="com.ks.daylucky.pojo.DO.UserInfoExtra">
|
insert into user_info_extra
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="uid != null">
|
uid,
|
</if>
|
<if test="msgSetting != null">
|
msg_setting,
|
</if>
|
<if test="msgUnreadCount != null">
|
msg_unread_count,
|
</if>
|
<if test="createTime != null">
|
create_time,
|
</if>
|
<if test="updateTime != null">
|
update_time,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="uid != null">
|
#{uid,jdbcType=BIGINT},
|
</if>
|
<if test="msgSetting != null">
|
#{msgSetting,jdbcType=VARCHAR},
|
</if>
|
<if test="msgUnreadCount != null">
|
#{msgUnreadCount,jdbcType=INTEGER},
|
</if>
|
<if test="createTime != null">
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateTime != null">
|
#{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.ks.daylucky.pojo.DO.UserInfoExtra">
|
update user_info_extra
|
<set>
|
<if test="msgSetting != null">
|
msg_setting = #{msgSetting,jdbcType=VARCHAR},
|
</if>
|
<if test="msgUnreadCount != null">
|
msg_unread_count = #{msgUnreadCount,jdbcType=INTEGER},
|
</if>
|
<if test="createTime != null">
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateTime != null">
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
</set>
|
where uid = #{uid,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.ks.daylucky.pojo.DO.UserInfoExtra">
|
update user_info_extra
|
set msg_setting = #{msgSetting,jdbcType=VARCHAR},
|
msg_unread_count = #{msgUnreadCount,jdbcType=INTEGER},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
where uid = #{uid,jdbcType=BIGINT}
|
</update>
|
</mapper>
|