...
|
...
|
@@ -2,89 +2,107 @@ |
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
<mapper namespace="com.tianbo.warehouse.dao.USERSMapper" >
|
|
|
<resultMap id="BaseResultMap" type="com.tianbo.warehouse.model.USERS" >
|
|
|
<id column="USER_ID" property="userId" jdbcType="DECIMAL" />
|
|
|
<result column="USERNAME" property="username" jdbcType="VARCHAR" />
|
|
|
<result column="PASSWORD" property="password" jdbcType="VARCHAR" />
|
|
|
<result column="STATE" property="state" jdbcType="DECIMAL" />
|
|
|
<result column="CREATTIME" property="creattime" jdbcType="TIMESTAMP" />
|
|
|
<result column="SEX" property="sex" jdbcType="VARCHAR" />
|
|
|
<result column="ADDRESS" property="address" jdbcType="VARCHAR" />
|
|
|
<result column="BIRTHDAY" property="birthday" jdbcType="TIMESTAMP" />
|
|
|
<result column="MOBILEPHONE" property="mobilephone" jdbcType="VARCHAR" />
|
|
|
<result column="UPDATETIME" property="updatetime" jdbcType="TIMESTAMP" />
|
|
|
<id column="user_id" property="userId" jdbcType="INTEGER" />
|
|
|
<result column="username" property="username" jdbcType="VARCHAR" />
|
|
|
<result column="password" property="password" jdbcType="VARCHAR" />
|
|
|
<result column="birthday" property="birthday" jdbcType="TIMESTAMP" />
|
|
|
<result column="sex" property="sex" jdbcType="CHAR" />
|
|
|
<result column="address" property="address" jdbcType="VARCHAR" />
|
|
|
<result column="state" property="state" jdbcType="BIT" />
|
|
|
<result column="mobilePhone" property="mobilephone" jdbcType="VARCHAR" />
|
|
|
<result column="creatTime" property="creattime" jdbcType="TIMESTAMP" />
|
|
|
<result column="updateTime" property="updatetime" jdbcType="TIMESTAMP" />
|
|
|
<result column="userFace" property="userface" jdbcType="VARCHAR" />
|
|
|
<result column="ext1" property="ext1" jdbcType="VARCHAR" />
|
|
|
<result column="ext2" property="ext2" jdbcType="VARCHAR" />
|
|
|
<result column="ext3" property="ext3" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
USER_ID, USERNAME, PASSWORD, STATE, CREATTIME, SEX, ADDRESS, BIRTHDAY, MOBILEPHONE,
|
|
|
UPDATETIME
|
|
|
user_id, username, password, birthday, sex, address, state, mobilePhone, creatTime,
|
|
|
updateTime, userFace, ext1, ext2, ext3
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.math.BigDecimal" >
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from USERS
|
|
|
where USER_ID = #{userId,jdbcType=DECIMAL}
|
|
|
from users
|
|
|
where user_id = #{userId,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<select id="selectByUsername" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from USERS
|
|
|
where USERNAME = #{username,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from USERS
|
|
|
where USERNAME = #{username,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectAllUser" resultMap="BaseResultMap" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from USERS
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal" >
|
|
|
delete from USERS
|
|
|
where USER_ID = #{userId,jdbcType=DECIMAL}
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
delete from users
|
|
|
where user_id = #{userId,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.tianbo.warehouse.model.USERS" >
|
|
|
insert into USERS (USER_ID, USERNAME, PASSWORD,
|
|
|
STATE, CREATTIME, SEX,
|
|
|
ADDRESS, BIRTHDAY, MOBILEPHONE,
|
|
|
UPDATETIME)
|
|
|
values (#{userId,jdbcType=DECIMAL}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
|
#{state,jdbcType=DECIMAL}, #{creattime,jdbcType=TIMESTAMP}, #{sex,jdbcType=VARCHAR},
|
|
|
#{address,jdbcType=VARCHAR}, #{birthday,jdbcType=TIMESTAMP}, #{mobilephone,jdbcType=VARCHAR},
|
|
|
#{updatetime,jdbcType=TIMESTAMP})
|
|
|
insert into users (user_id, username, password,
|
|
|
birthday, sex, address,
|
|
|
state, mobilePhone, creatTime,
|
|
|
updateTime, userFace, ext1,
|
|
|
ext2, ext3)
|
|
|
values (#{userId,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
|
#{birthday,jdbcType=TIMESTAMP}, #{sex,jdbcType=CHAR}, #{address,jdbcType=VARCHAR},
|
|
|
#{state,jdbcType=BIT}, #{mobilephone,jdbcType=VARCHAR}, #{creattime,jdbcType=TIMESTAMP},
|
|
|
#{updatetime,jdbcType=TIMESTAMP}, #{userface,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR},
|
|
|
#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.tianbo.warehouse.model.USERS" >
|
|
|
insert into USERS
|
|
|
insert into users
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
<if test="userId != null" >
|
|
|
USER_ID,
|
|
|
user_id,
|
|
|
</if>
|
|
|
<if test="username != null" >
|
|
|
USERNAME,
|
|
|
username,
|
|
|
</if>
|
|
|
<if test="password != null" >
|
|
|
PASSWORD,
|
|
|
</if>
|
|
|
<if test="state != null" >
|
|
|
STATE,
|
|
|
password,
|
|
|
</if>
|
|
|
<if test="creattime != null" >
|
|
|
CREATTIME,
|
|
|
<if test="birthday != null" >
|
|
|
birthday,
|
|
|
</if>
|
|
|
<if test="sex != null" >
|
|
|
SEX,
|
|
|
sex,
|
|
|
</if>
|
|
|
<if test="address != null" >
|
|
|
ADDRESS,
|
|
|
address,
|
|
|
</if>
|
|
|
<if test="birthday != null" >
|
|
|
BIRTHDAY,
|
|
|
<if test="state != null" >
|
|
|
state,
|
|
|
</if>
|
|
|
<if test="mobilephone != null" >
|
|
|
MOBILEPHONE,
|
|
|
mobilePhone,
|
|
|
</if>
|
|
|
<if test="creattime != null" >
|
|
|
creatTime,
|
|
|
</if>
|
|
|
<if test="updatetime != null" >
|
|
|
UPDATETIME,
|
|
|
updateTime,
|
|
|
</if>
|
|
|
<if test="userface != null" >
|
|
|
userFace,
|
|
|
</if>
|
|
|
<if test="ext1 != null" >
|
|
|
ext1,
|
|
|
</if>
|
|
|
<if test="ext2 != null" >
|
|
|
ext2,
|
|
|
</if>
|
|
|
<if test="ext3 != null" >
|
|
|
ext3,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="userId != null" >
|
|
|
#{userId,jdbcType=DECIMAL},
|
|
|
#{userId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="username != null" >
|
|
|
#{username,jdbcType=VARCHAR},
|
...
|
...
|
@@ -92,73 +110,101 @@ |
|
|
<if test="password != null" >
|
|
|
#{password,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="state != null" >
|
|
|
#{state,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="creattime != null" >
|
|
|
#{creattime,jdbcType=TIMESTAMP},
|
|
|
<if test="birthday != null" >
|
|
|
#{birthday,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="sex != null" >
|
|
|
#{sex,jdbcType=VARCHAR},
|
|
|
#{sex,jdbcType=CHAR},
|
|
|
</if>
|
|
|
<if test="address != null" >
|
|
|
#{address,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="birthday != null" >
|
|
|
#{birthday,jdbcType=TIMESTAMP},
|
|
|
<if test="state != null" >
|
|
|
#{state,jdbcType=BIT},
|
|
|
</if>
|
|
|
<if test="mobilephone != null" >
|
|
|
#{mobilephone,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="creattime != null" >
|
|
|
#{creattime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="updatetime != null" >
|
|
|
#{updatetime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="userface != null" >
|
|
|
#{userface,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="ext1 != null" >
|
|
|
#{ext1,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="ext2 != null" >
|
|
|
#{ext2,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="ext3 != null" >
|
|
|
#{ext3,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.USERS" >
|
|
|
update USERS
|
|
|
update users
|
|
|
<set >
|
|
|
<if test="username != null" >
|
|
|
USERNAME = #{username,jdbcType=VARCHAR},
|
|
|
username = #{username,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="password != null" >
|
|
|
PASSWORD = #{password,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="state != null" >
|
|
|
STATE = #{state,jdbcType=DECIMAL},
|
|
|
password = #{password,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="creattime != null" >
|
|
|
CREATTIME = #{creattime,jdbcType=TIMESTAMP},
|
|
|
<if test="birthday != null" >
|
|
|
birthday = #{birthday,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="sex != null" >
|
|
|
SEX = #{sex,jdbcType=VARCHAR},
|
|
|
sex = #{sex,jdbcType=CHAR},
|
|
|
</if>
|
|
|
<if test="address != null" >
|
|
|
ADDRESS = #{address,jdbcType=VARCHAR},
|
|
|
address = #{address,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="birthday != null" >
|
|
|
BIRTHDAY = #{birthday,jdbcType=TIMESTAMP},
|
|
|
<if test="state != null" >
|
|
|
state = #{state,jdbcType=BIT},
|
|
|
</if>
|
|
|
<if test="mobilephone != null" >
|
|
|
MOBILEPHONE = #{mobilephone,jdbcType=VARCHAR},
|
|
|
mobilePhone = #{mobilephone,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="creattime != null" >
|
|
|
creatTime = #{creattime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="updatetime != null" >
|
|
|
UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
|
|
|
updateTime = #{updatetime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="userface != null" >
|
|
|
userFace = #{userface,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="ext1 != null" >
|
|
|
ext1 = #{ext1,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="ext2 != null" >
|
|
|
ext2 = #{ext2,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="ext3 != null" >
|
|
|
ext3 = #{ext3,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where USER_ID = #{userId,jdbcType=DECIMAL}
|
|
|
where user_id = #{userId,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.tianbo.warehouse.model.USERS" >
|
|
|
update USERS
|
|
|
set USERNAME = #{username,jdbcType=VARCHAR},
|
|
|
PASSWORD = #{password,jdbcType=VARCHAR},
|
|
|
STATE = #{state,jdbcType=DECIMAL},
|
|
|
CREATTIME = #{creattime,jdbcType=TIMESTAMP},
|
|
|
SEX = #{sex,jdbcType=VARCHAR},
|
|
|
ADDRESS = #{address,jdbcType=VARCHAR},
|
|
|
BIRTHDAY = #{birthday,jdbcType=TIMESTAMP},
|
|
|
MOBILEPHONE = #{mobilephone,jdbcType=VARCHAR},
|
|
|
UPDATETIME = #{updatetime,jdbcType=TIMESTAMP}
|
|
|
where USER_ID = #{userId,jdbcType=DECIMAL}
|
|
|
update users
|
|
|
set username = #{username,jdbcType=VARCHAR},
|
|
|
password = #{password,jdbcType=VARCHAR},
|
|
|
birthday = #{birthday,jdbcType=TIMESTAMP},
|
|
|
sex = #{sex,jdbcType=CHAR},
|
|
|
address = #{address,jdbcType=VARCHAR},
|
|
|
state = #{state,jdbcType=BIT},
|
|
|
mobilePhone = #{mobilephone,jdbcType=VARCHAR},
|
|
|
creatTime = #{creattime,jdbcType=TIMESTAMP},
|
|
|
updateTime = #{updatetime,jdbcType=TIMESTAMP},
|
|
|
userFace = #{userface,jdbcType=VARCHAR},
|
|
|
ext1 = #{ext1,jdbcType=VARCHAR},
|
|
|
ext2 = #{ext2,jdbcType=VARCHAR},
|
|
|
ext3 = #{ext3,jdbcType=VARCHAR}
|
|
|
where user_id = #{userId,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|