|
|
@ -24,6 +24,8 @@
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
<result property="address" column="address"/>
|
|
|
|
<result property="address" column="address"/>
|
|
|
|
|
|
|
|
<result property="consigneeName" column="consignee_name"/>
|
|
|
|
|
|
|
|
<result property="consigneePhonenumber" column="consignee_phonenumber"/>
|
|
|
|
<association property="dept" javaType="SysDept" resultMap="deptResult"/>
|
|
|
|
<association property="dept" javaType="SysDept" resultMap="deptResult"/>
|
|
|
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
|
|
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
@ -49,6 +51,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectUserVo">
|
|
|
|
<sql id="selectUserVo">
|
|
|
|
select u.address,
|
|
|
|
select u.address,
|
|
|
|
|
|
|
|
u.consignee_name,
|
|
|
|
|
|
|
|
u.consignee_phonenumber,
|
|
|
|
u.user_id,
|
|
|
|
u.user_id,
|
|
|
|
u.dept_id,
|
|
|
|
u.dept_id,
|
|
|
|
u.user_name,
|
|
|
|
u.user_name,
|
|
|
@ -85,8 +89,26 @@
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
|
select u.address, u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex,
|
|
|
|
select u.address,
|
|
|
|
u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from
|
|
|
|
u.consignee_name,
|
|
|
|
|
|
|
|
u.consignee_phonenumber,
|
|
|
|
|
|
|
|
u.user_id,
|
|
|
|
|
|
|
|
u.dept_id,
|
|
|
|
|
|
|
|
u.nick_name,
|
|
|
|
|
|
|
|
u.user_name,
|
|
|
|
|
|
|
|
u.email,
|
|
|
|
|
|
|
|
u.avatar,
|
|
|
|
|
|
|
|
u.phonenumber,
|
|
|
|
|
|
|
|
u.sex,
|
|
|
|
|
|
|
|
u.status,
|
|
|
|
|
|
|
|
u.del_flag,
|
|
|
|
|
|
|
|
u.login_ip,
|
|
|
|
|
|
|
|
u.login_date,
|
|
|
|
|
|
|
|
u.create_by,
|
|
|
|
|
|
|
|
u.create_time,
|
|
|
|
|
|
|
|
u.remark,
|
|
|
|
|
|
|
|
d.dept_name,
|
|
|
|
|
|
|
|
d.leader from
|
|
|
|
sys_user u
|
|
|
|
sys_user u
|
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
|
where u.del_flag = '0'
|
|
|
|
where u.del_flag = '0'
|
|
|
@ -117,7 +139,16 @@
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
|
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
|
select distinct u.address,u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status,
|
|
|
|
select distinct u.address,
|
|
|
|
|
|
|
|
u.consignee_name,
|
|
|
|
|
|
|
|
u.consignee_phonenumber,
|
|
|
|
|
|
|
|
u.user_id,
|
|
|
|
|
|
|
|
u.dept_id,
|
|
|
|
|
|
|
|
u.user_name,
|
|
|
|
|
|
|
|
u.nick_name,
|
|
|
|
|
|
|
|
u.email,
|
|
|
|
|
|
|
|
u.phonenumber,
|
|
|
|
|
|
|
|
u.status,
|
|
|
|
u.create_time
|
|
|
|
u.create_time
|
|
|
|
from sys_user u
|
|
|
|
from sys_user u
|
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
@ -135,7 +166,16 @@
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
|
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
|
select distinct u.address,u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status,
|
|
|
|
select distinct u.address,
|
|
|
|
|
|
|
|
u.consignee_name,
|
|
|
|
|
|
|
|
u.consignee_phonenumber,
|
|
|
|
|
|
|
|
u.user_id,
|
|
|
|
|
|
|
|
u.dept_id,
|
|
|
|
|
|
|
|
u.user_name,
|
|
|
|
|
|
|
|
u.nick_name,
|
|
|
|
|
|
|
|
u.email,
|
|
|
|
|
|
|
|
u.phonenumber,
|
|
|
|
|
|
|
|
u.status,
|
|
|
|
u.create_time
|
|
|
|
u.create_time
|
|
|
|
from sys_user u
|
|
|
|
from sys_user u
|
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
@ -192,6 +232,8 @@
|
|
|
|
insert into sys_user(
|
|
|
|
insert into sys_user(
|
|
|
|
<if test="userId != null and userId != 0">user_id,</if>
|
|
|
|
<if test="userId != null and userId != 0">user_id,</if>
|
|
|
|
<if test="address != null and address != ''">address,</if>
|
|
|
|
<if test="address != null and address != ''">address,</if>
|
|
|
|
|
|
|
|
<if test="consigneeName != null and consigneeName != ''">consignee_name,</if>
|
|
|
|
|
|
|
|
<if test="consigneePhonenumber != null and consigneePhonenumber != ''">consignee_phonenumber,</if>
|
|
|
|
<if test="deptId != null and deptId != 0">dept_id,</if>
|
|
|
|
<if test="deptId != null and deptId != 0">dept_id,</if>
|
|
|
|
<if test="userName != null and userName != ''">user_name,</if>
|
|
|
|
<if test="userName != null and userName != ''">user_name,</if>
|
|
|
|
<if test="nickName != null and nickName != ''">nick_name,</if>
|
|
|
|
<if test="nickName != null and nickName != ''">nick_name,</if>
|
|
|
@ -207,6 +249,8 @@
|
|
|
|
)values(
|
|
|
|
)values(
|
|
|
|
<if test="userId != null and userId != ''">#{userId},</if>
|
|
|
|
<if test="userId != null and userId != ''">#{userId},</if>
|
|
|
|
<if test="address != null and address != ''">#{address},</if>
|
|
|
|
<if test="address != null and address != ''">#{address},</if>
|
|
|
|
|
|
|
|
<if test="consigneeName != null and consigneeName != ''">#{consigneeName},</if>
|
|
|
|
|
|
|
|
<if test="consigneePhonenumber != null and consigneePhonenumber != ''">#{consigneePhonenumber},</if>
|
|
|
|
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
|
|
|
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
|
|
|
<if test="userName != null and userName != ''">#{userName},</if>
|
|
|
|
<if test="userName != null and userName != ''">#{userName},</if>
|
|
|
|
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
|
|
|
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
|
|
@ -225,20 +269,54 @@
|
|
|
|
<update id="updateUser" parameterType="SysUser">
|
|
|
|
<update id="updateUser" parameterType="SysUser">
|
|
|
|
update sys_user
|
|
|
|
update sys_user
|
|
|
|
<set>
|
|
|
|
<set>
|
|
|
|
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
|
|
|
<if test="deptId != null and deptId != 0">
|
|
|
|
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
|
|
|
dept_id = #{deptId},
|
|
|
|
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
|
|
|
</if>
|
|
|
|
<if test="address != null and address != ''">address = #{address},</if>
|
|
|
|
<if test="userName != null and userName != ''">
|
|
|
|
<if test="email != null ">email = #{email},</if>
|
|
|
|
user_name = #{userName},
|
|
|
|
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
|
|
|
</if>
|
|
|
|
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
|
|
|
<if test="nickName != null and nickName != ''">
|
|
|
|
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
|
|
|
nick_name = #{nickName},
|
|
|
|
<if test="password != null and password != ''">password = #{password},</if>
|
|
|
|
</if>
|
|
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
|
|
<if test="consigneeName != null and consigneeName != ''">
|
|
|
|
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
|
|
|
|
consignee_name = #{consigneeName},
|
|
|
|
<if test="loginDate != null">login_date = #{loginDate},</if>
|
|
|
|
</if>
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
|
<if test="consigneePhonenumber != null and consigneePhonenumber != ''">
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
consignee_phonenumber = #{consigneePhonenumber},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="address != null and address != ''">
|
|
|
|
|
|
|
|
address = #{address},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="email != null ">
|
|
|
|
|
|
|
|
email = #{email},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="phonenumber != null ">
|
|
|
|
|
|
|
|
phonenumber = #{phonenumber},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="sex != null and sex != ''">
|
|
|
|
|
|
|
|
sex = #{sex},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="avatar != null and avatar != ''">
|
|
|
|
|
|
|
|
avatar = #{avatar},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="password != null and password != ''">
|
|
|
|
|
|
|
|
password = #{password},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="status != null and status != ''">
|
|
|
|
|
|
|
|
status = #{status},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="loginIp != null and loginIp != ''">
|
|
|
|
|
|
|
|
login_ip = #{loginIp},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="loginDate != null">
|
|
|
|
|
|
|
|
login_date = #{loginDate},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">
|
|
|
|
|
|
|
|
update_by = #{updateBy},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="remark != null">
|
|
|
|
|
|
|
|
remark = #{remark},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
update_time = sysdate()
|
|
|
|
update_time = sysdate()
|
|
|
|
</set>
|
|
|
|
</set>
|
|
|
|
where user_id = #{userId}
|
|
|
|
where user_id = #{userId}
|
|
|
|