<?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.tool.bkz.dao.mybatis.user.UserInfoMapper" >
|
<resultMap id="BaseResultMap" type="com.ks.tool.bkz.entity.user.UserInfo" >
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="account" property="account" jdbcType="VARCHAR" />
|
<result column="level" property="level" jdbcType="INTEGER" />
|
<result column="login_time" property="loginTime" jdbcType="TIMESTAMP" />
|
<result column="super_time" property="superTime" jdbcType="TIMESTAMP" />
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
<result column="login_ip_info" property="loginIpInfo" jdbcType="VARCHAR" />
|
<result column="state" property="state" jdbcType="INTEGER" />
|
<result column="state_desc" property="stateDesc" jdbcType="VARCHAR" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
id, account, level, login_time, super_time, create_time, update_time, login_ip_info,
|
state, state_desc
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
select
|
<include refid="Base_Column_List" />
|
from tt_user
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
|
<select id="selectByAccount" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
select
|
<include refid="Base_Column_List" />
|
from tt_user
|
where account = #{0}
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
delete from tt_user
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.ks.tool.bkz.entity.user.UserInfo" >
|
insert into tt_user (id, account, level,
|
login_time, super_time, create_time,
|
update_time, login_ip_info, state,
|
state_desc)
|
values (#{id,jdbcType=BIGINT}, #{account,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER},
|
#{loginTime,jdbcType=TIMESTAMP}, #{superTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
|
#{updateTime,jdbcType=TIMESTAMP}, #{loginIpInfo,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER},
|
#{stateDesc,jdbcType=VARCHAR})
|
</insert>
|
<insert id="insertSelective" parameterType="com.ks.tool.bkz.entity.user.UserInfo" >
|
insert into tt_user
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
id,
|
</if>
|
<if test="account != null" >
|
account,
|
</if>
|
<if test="level != null" >
|
level,
|
</if>
|
<if test="loginTime != null" >
|
login_time,
|
</if>
|
<if test="superTime != null" >
|
super_time,
|
</if>
|
<if test="createTime != null" >
|
create_time,
|
</if>
|
<if test="updateTime != null" >
|
update_time,
|
</if>
|
<if test="loginIpInfo != null" >
|
login_ip_info,
|
</if>
|
<if test="state != null" >
|
state,
|
</if>
|
<if test="stateDesc != null" >
|
state_desc,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
#{id,jdbcType=BIGINT},
|
</if>
|
<if test="account != null" >
|
#{account,jdbcType=VARCHAR},
|
</if>
|
<if test="level != null" >
|
#{level,jdbcType=INTEGER},
|
</if>
|
<if test="loginTime != null" >
|
#{loginTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="superTime != null" >
|
#{superTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createTime != null" >
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateTime != null" >
|
#{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="loginIpInfo != null" >
|
#{loginIpInfo,jdbcType=VARCHAR},
|
</if>
|
<if test="state != null" >
|
#{state,jdbcType=INTEGER},
|
</if>
|
<if test="stateDesc != null" >
|
#{stateDesc,jdbcType=VARCHAR},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.ks.tool.bkz.entity.user.UserInfo" >
|
update tt_user
|
<set >
|
<if test="account != null" >
|
account = #{account,jdbcType=VARCHAR},
|
</if>
|
<if test="level != null" >
|
level = #{level,jdbcType=INTEGER},
|
</if>
|
<if test="loginTime != null" >
|
login_time = #{loginTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="superTime != null" >
|
super_time = #{superTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createTime != null" >
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateTime != null" >
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="loginIpInfo != null" >
|
login_ip_info = #{loginIpInfo,jdbcType=VARCHAR},
|
</if>
|
<if test="state != null" >
|
state = #{state,jdbcType=INTEGER},
|
</if>
|
<if test="stateDesc != null" >
|
state_desc = #{stateDesc,jdbcType=VARCHAR},
|
</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.ks.tool.bkz.entity.user.UserInfo" >
|
update tt_user
|
set account = #{account,jdbcType=VARCHAR},
|
level = #{level,jdbcType=INTEGER},
|
login_time = #{loginTime,jdbcType=TIMESTAMP},
|
super_time = #{superTime,jdbcType=TIMESTAMP},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
login_ip_info = #{loginIpInfo,jdbcType=VARCHAR},
|
state = #{state,jdbcType=INTEGER},
|
state_desc = #{stateDesc,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|