|
@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.dgtly.system.mapper.SysUserMapper">
|
|
|
|
|
|
- <resultMap type="SysUser" id="SysUserResult">
|
|
|
+ <resultMap id="SysUserResult" type="SysUser">
|
|
|
<id property="userId" column="user_id" />
|
|
|
<result property="companyId" column="company_id" />
|
|
|
<result property="deptId" column="dept_id" />
|
|
@@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="remark" column="remark" />
|
|
|
<result property="isConsignee" column="is_consignee" />
|
|
|
+ <result property="isIndependently" column="is_independently" />
|
|
|
<result property="isSync" column="is_sync" />
|
|
|
<result property="quit" column="quit" />
|
|
|
<result property="isAuthentication" column="is_authentication" />
|
|
@@ -88,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<sql id="selectUserVo">
|
|
|
select u.user_id,u.company_id, u.dept_id, u.login_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt,u.id_type,u.id_number,u.account_id,u.is_authentication,u.receive_url_mobile_no, u.status,
|
|
|
- u.del_flag, u.login_ip, u.login_date, u.create_time, u.remark,u.is_consignee,u.person_attestation_time,is_sync,
|
|
|
+ u.del_flag, u.login_ip, u.login_date, u.create_time, u.remark,u.is_consignee,u.person_attestation_time,u.is_independently,is_sync,
|
|
|
c.company_name,u.quit,
|
|
|
d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
|
|
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
|
|
@@ -104,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
select u.user_id,u.company_id, u.dept_id, u.login_name, u.user_name,u.id_type,u.id_number,u.account_id,u.is_authentication,u.receive_url_mobile_no, u.email, u.avatar,
|
|
|
- u.phonenumber, u.password, u.sex, u.salt, u.status, u.del_flag,u.quit,
|
|
|
+ u.phonenumber, u.password, u.sex, u.salt, u.status, u.del_flag,u.quit,u.is_independently,
|
|
|
u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
|
|
d.dept_name, d.leader,
|
|
|
suse.identity,suse.sales_level,suse.org_name,suse.org_code,suse.post_name,suse.is_customer_manager,ce.is_authentication is_org_authentication,ce.org_attestation_time
|
|
@@ -216,7 +217,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectUserByLoginName" parameterType="String" resultMap="SysUserResult">
|
|
|
<include refid="selectUserVo"/>
|
|
|
- where u.login_name = #{userName} and u.quit is null
|
|
|
+ where u.login_name = #{userName} and u.quit is null GROUP BY login_name
|
|
|
</select>
|
|
|
|
|
|
<select id="selectUserByIsManager" resultType="java.lang.String">
|
|
@@ -248,6 +249,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
u.id_number,
|
|
|
u.account_id,
|
|
|
u.is_authentication,
|
|
|
+ u.is_independently,
|
|
|
u.receive_url_mobile_no,
|
|
|
u.STATUS,
|
|
|
u.del_flag,
|
|
@@ -330,6 +332,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="idNumber != null and idNumber != ''">id_number = #{idNumber},</if>
|
|
|
<if test="accountId != null and accountId != ''">account_id = #{accountId},</if>
|
|
|
<if test="isAuthentication != null and isAuthentication != ''">is_authentication = #{isAuthentication},</if>
|
|
|
+ <if test="isIndependently != null ">is_independently = #{isIndependently},</if>
|
|
|
<if test="personAttestationTime != null">person_attestation_time = #{personAttestationTime},</if>
|
|
|
<if test="receiveUrlMobileNo != null and receiveUrlMobileNo != ''">receive_url_mobile_no = #{receiveUrlMobileNo},</if>
|
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
@@ -369,6 +372,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
<if test="isConsignee != null">is_consignee = #{isConsignee},</if>
|
|
|
<if test="isSync != null">is_sync = #{isSync},</if>
|
|
|
+ <if test="isIndependently != null ">is_independently = #{isIndependently},</if>
|
|
|
update_time = sysdate()
|
|
|
</set>
|
|
|
where login_name = #{loginName}
|
|
@@ -526,13 +530,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
u.user_id,
|
|
|
u.user_name,
|
|
|
u.is_consignee,
|
|
|
+ u.is_independently,
|
|
|
v.sap_employee_id,
|
|
|
v.org_code
|
|
|
FROM
|
|
|
sys_user u
|
|
|
LEFT JOIN sys_user_ext v ON u.user_id = v.user_id
|
|
|
WHERE
|
|
|
- v.org_code =#{orgCode}
|
|
|
+ v.org_code =#{orgCode} and u.quit is null
|
|
|
</select>
|
|
|
|
|
|
<select id="getCustomNameByCode" resultType="java.lang.String" >
|