|
...
|
...
|
@@ -23,11 +23,18 @@ |
|
|
|
<result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
|
|
|
|
<result column="remarks" property="remarks" jdbcType="VARCHAR" />
|
|
|
|
<result column="del_flag" property="delFlag" jdbcType="CHAR" />
|
|
|
|
<result column="online" property="online" jdbcType="BOOLEAN" />
|
|
|
|
<result column="expiry_date" property="expiryDate" jdbcType="TIMESTAMP" />
|
|
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List" >
|
|
|
|
id, company_id, office_id, login_name, password, no, name, email, phone, mobile,
|
|
|
|
user_type, photo, login_ip, login_date, login_flag, create_by, create_date, update_by,
|
|
|
|
update_date, remarks, del_flag
|
|
|
|
update_date, remarks, del_flag, online, expiry_date
|
|
|
|
</sql>
|
|
|
|
<sql id="Safe_Column_List">
|
|
|
|
id, company_id, office_id, login_name, no, name, email, phone, mobile,
|
|
|
|
user_type, photo, login_ip, login_date, login_flag, create_by, create_date, update_by,
|
|
|
|
update_date, remarks, del_flag, online, expiry_date
|
|
|
|
</sql>
|
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
|
select
|
|
...
|
...
|
@@ -37,9 +44,9 @@ |
|
|
|
</select>
|
|
|
|
<select id="selectAllUser" resultMap="BaseResultMap" parameterType="com.tianbo.warehouse.model.KakoUser" >
|
|
|
|
select
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
<include refid="Safe_Column_List" />
|
|
|
|
from sys_user
|
|
|
|
WHERE 1=1
|
|
|
|
<where>
|
|
|
|
and del_flag= '0'
|
|
|
|
<if test=" loginName != null" >
|
|
|
|
and login_name like concat('%',#{loginName,jdbcType=VARCHAR},'%')
|
|
...
|
...
|
@@ -47,6 +54,13 @@ |
|
|
|
<if test="name != null" >
|
|
|
|
and name like concat('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
|
</if>
|
|
|
|
<if test="online != null" >
|
|
|
|
and online = #{online,jdbcType=BOOLEAN}
|
|
|
|
</if>
|
|
|
|
<if test="loginFlag != null" >
|
|
|
|
and login_flag = #{loginFlag,jdbcType=VARCHAR}
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
<select id="selectByUsername" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
|
select
|
|
...
|
...
|
@@ -54,6 +68,14 @@ |
|
|
|
from sys_user
|
|
|
|
where login_name = #{login_name,jdbcType=VARCHAR}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectOnlineUser" resultMap="BaseResultMap" >
|
|
|
|
select
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
from sys_user
|
|
|
|
where online > 0;
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<update id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
|
|
|
update sys_user
|
|
|
|
set
|
|
...
|
...
|
@@ -67,7 +89,7 @@ |
|
|
|
mobile, user_type, photo,
|
|
|
|
login_ip, login_date, login_flag,
|
|
|
|
create_by, create_date, update_by,
|
|
|
|
update_date, remarks, del_flag
|
|
|
|
update_date, remarks, del_flag, expiry_date
|
|
|
|
)
|
|
|
|
values (#{id,jdbcType=VARCHAR}, #{companyId,jdbcType=VARCHAR}, #{officeId,jdbcType=VARCHAR},
|
|
|
|
#{loginName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{no,jdbcType=VARCHAR},
|
|
...
|
...
|
@@ -75,7 +97,7 @@ |
|
|
|
#{mobile,jdbcType=VARCHAR}, #{userType,jdbcType=CHAR}, #{photo,jdbcType=VARCHAR},
|
|
|
|
#{loginIp,jdbcType=VARCHAR}, #{loginDate,jdbcType=TIMESTAMP}, #{loginFlag,jdbcType=VARCHAR},
|
|
|
|
#{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
|
|
|
|
#{updateDate,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR}
|
|
|
|
#{updateDate,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR}, #{expiryDate,jdbcType=TIMESTAMP}
|
|
|
|
)
|
|
|
|
</insert>
|
|
|
|
<insert id="insertSelective" parameterType="com.tianbo.warehouse.model.KakoUser" >
|
|
...
|
...
|
@@ -144,6 +166,9 @@ |
|
|
|
<if test="delFlag != null" >
|
|
|
|
del_flag,
|
|
|
|
</if>
|
|
|
|
<if test="expiryDate != null" >
|
|
|
|
expiry_date,
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
<if test="id != null" >
|
|
...
|
...
|
@@ -209,6 +234,9 @@ |
|
|
|
<if test="delFlag != null" >
|
|
|
|
#{delFlag,jdbcType=CHAR},
|
|
|
|
</if>
|
|
|
|
<if test="expiryDate != null" >
|
|
|
|
#{expiryDate,jdbcType=TIMESTAMP},
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.KakoUser" >
|
|
...
|
...
|
@@ -274,6 +302,12 @@ |
|
|
|
<if test="delFlag != null" >
|
|
|
|
del_flag = #{delFlag,jdbcType=CHAR},
|
|
|
|
</if>
|
|
|
|
<if test="online != null" >
|
|
|
|
online = #{online,jdbcType=BOOLEAN},
|
|
|
|
</if>
|
|
|
|
<if test="expiryDate != null" >
|
|
|
|
expiry_date = #{expiryDate,jdbcType=TIMESTAMP},
|
|
|
|
</if>
|
|
|
|
</set>
|
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
|
</update>
|
|
...
|
...
|
@@ -298,7 +332,9 @@ |
|
|
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
|
update_date = #{updateDate,jdbcType=TIMESTAMP},
|
|
|
|
remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
|
del_flag = #{delFlag,jdbcType=CHAR}
|
|
|
|
del_flag = #{delFlag,jdbcType=CHAR},
|
|
|
|
online = #{online,jdbcType=BOOLEAN},
|
|
|
|
expiry_date = #{expiryDate,jdbcType=TIMESTAMP}
|
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
|
</update>
|
|
|
|
|
...
|
...
|
|