...
|
...
|
@@ -17,6 +17,10 @@ |
|
|
<result column="email" property="email" jdbcType="VARCHAR" />
|
|
|
<result column="age" property="age" jdbcType="INTEGER" />
|
|
|
<result column="company_id" property="companyId" jdbcType="INTEGER" />
|
|
|
<result column="user_status" property="userStatus" jdbcType="INTEGER" />
|
|
|
<result column="login_ip" property="loginIp" jdbcType="VARCHAR" />
|
|
|
<result column="login_date" property="loginDate" jdbcType="TIMESTAMP" />
|
|
|
<result column="create_by" property="createBy" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
<resultMap id="SecurityResult" type="com.tianbo.warehouse.model.USERS">
|
|
|
<id column="user_id" property="userId" jdbcType="INTEGER" />
|
...
|
...
|
@@ -102,10 +106,12 @@ |
|
|
|
|
|
<sql id="Base_Column_List" >
|
|
|
user_id, username, password, birthday, sex, address, state, mobilePhone, creatTime,
|
|
|
updateTime, userFace, realName, email, age,company_id
|
|
|
updateTime, userFace, realName, email, age, company_id,
|
|
|
user_status, login_ip, login_date, create_by
|
|
|
</sql>
|
|
|
<sql id="user_List" >
|
|
|
user_id, username, birthday, sex, address, state, mobilePhone,userFace, realName, email, age
|
|
|
user_id, username, birthday, sex, address, state, mobilePhone,userFace, realName, email, age,
|
|
|
user_status, login_ip, login_date, create_by
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
...
|
...
|
@@ -155,12 +161,13 @@ |
|
|
realName,
|
|
|
email,
|
|
|
age,
|
|
|
company_id,
|
|
|
company_id,user_status, login_ip, login_date, create_by,
|
|
|
r.role_id,role_name,role_sign,r.description AS rdescription,`type`,parentId,rsort,customs_reg_code,business_license,departmentId,mq_code
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
user_id,username,birthday,sex,address,state,mobilePhone,creatTime,updateTime,userFace,realName,email,age,company_id
|
|
|
user_id,username,birthday,sex,address,state,mobilePhone,creatTime,updateTime,userFace,realName,email,age,company_id,
|
|
|
user_status, login_ip, login_date, create_by
|
|
|
FROM users
|
|
|
<where>
|
|
|
<if test=" username != null and username != ''" >
|
...
|
...
|
@@ -186,12 +193,12 @@ |
|
|
birthday, sex, address,
|
|
|
state, mobilePhone, creatTime,
|
|
|
updateTime, userFace, realName,
|
|
|
email, age)
|
|
|
email, age,create_by)
|
|
|
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}, #{realname,jdbcType=VARCHAR},
|
|
|
#{email,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER})
|
|
|
#{email,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER},#{createBy,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.tianbo.warehouse.model.USERS" >
|
|
|
insert into users
|
...
|
...
|
@@ -241,6 +248,9 @@ |
|
|
<if test="companyId != null" >
|
|
|
company_id,
|
|
|
</if>
|
|
|
<if test="createBy != null" >
|
|
|
create_by,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="userId != null" >
|
...
|
...
|
@@ -288,6 +298,9 @@ |
|
|
<if test="companyId != null" >
|
|
|
#{companyId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="createBy != null" >
|
|
|
#{createBy,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.USERS" >
|
...
|
...
|
@@ -332,6 +345,12 @@ |
|
|
<if test="companyId != null" >
|
|
|
company_id = #{companyId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="userStatus != null" >
|
|
|
user_status = #{userStatus,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="loginDate != null" >
|
|
|
login_date = #{loginDate,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
</set>
|
|
|
where user_id = #{userId,jdbcType=INTEGER}
|
|
|
</update>
|
...
|
...
|
@@ -365,4 +384,11 @@ |
|
|
and path = #{path,jdbcType=VARCHAR}
|
|
|
and dp.perm_status = 0
|
|
|
</select>
|
|
|
|
|
|
<select id="selectOnlineUser" resultMap="BaseResultMap" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from users
|
|
|
where user_status = 1;
|
|
|
</select>
|
|
|
</mapper> |
...
|
...
|
|