|
|
@@ -137,7 +137,7 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectAllocatedList" parameterType="com.xunmei.system.domain.vo.SysUserVO"
|
|
|
- resultType="com.xunmei.system.domain.vo.SysUserVO">
|
|
|
+ resultType="com.xunmei.system.api.domain.SysUser">
|
|
|
select distinct u.name as name,u.is_lock as isLock, u.id as id, u.dept_id as deptId, u.username as username,
|
|
|
u.phone as phone, u.create_time as createTime
|
|
|
from sys_user u
|
|
|
@@ -156,7 +156,7 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectUnallocatedList" parameterType="com.xunmei.system.domain.vo.SysUserVO"
|
|
|
- resultType="com.xunmei.system.domain.vo.SysUserVO">
|
|
|
+ resultType="com.xunmei.system.api.domain.SysUser">
|
|
|
select distinct u.id, u.dept_id, u.username, u.name, u.phone, u.is_lock, u.create_time
|
|
|
from sys_user u
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
@@ -388,4 +388,68 @@
|
|
|
inner join sys_user u on o.id = u.org_id
|
|
|
where u.id = #{userId}
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+
|
|
|
+ <select id="getPage" resultType="com.xunmei.system.api.domain.SysUser">
|
|
|
+ select
|
|
|
+ u.id,
|
|
|
+ u.dept_id,
|
|
|
+ u.is_lock,
|
|
|
+ u.job_id,
|
|
|
+ u.name,
|
|
|
+ u.username,
|
|
|
+ u.org_id,
|
|
|
+ u.phone,
|
|
|
+ u.create_time,
|
|
|
+ u.modified_name,
|
|
|
+ u.update_time,
|
|
|
+ u.modified_id,
|
|
|
+ u.password,
|
|
|
+ u.salt,
|
|
|
+ u.deleted,
|
|
|
+ u.last_ip,
|
|
|
+ u.last_time,
|
|
|
+ o.name as org_name,
|
|
|
+ o.path as org_path,
|
|
|
+ u.image,
|
|
|
+ u.card,
|
|
|
+ u.gender,
|
|
|
+ u.job_number,
|
|
|
+ u.note,
|
|
|
+ u.is_sign,
|
|
|
+ u.sign_time,
|
|
|
+ u.agreement_id,
|
|
|
+ u.sign_version,
|
|
|
+ u.approve_status,
|
|
|
+ u.locked,
|
|
|
+ u.create_by,
|
|
|
+ u.update_by,
|
|
|
+ u.code,
|
|
|
+ u.source,
|
|
|
+ u.original_org_id
|
|
|
+ from sys_user u
|
|
|
+ left join sys_org o on u.original_org_id = o.id
|
|
|
+ where 1=1
|
|
|
+ <choose>
|
|
|
+ <when test="info.checkSub">
|
|
|
+ AND o.path like concat('%', #{info.orgPath}, '%')
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ AND o.id = #{info.orgId}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ <if test="info.isLock != null and info.isLock != ''">
|
|
|
+ AND u.is_lock = #{isLock}
|
|
|
+ </if>
|
|
|
+ <if test="info.username != null and info.username != ''">
|
|
|
+ AND u.username like concat('%', #{info.username}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="info.params.beginTime != null and info.params.beginTime != ''">
|
|
|
+ <!-- 开始时间检索 -->
|
|
|
+ AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
+ <if test="info.params.endTime != null and info.params.endTime != ''">
|
|
|
+ <!-- 结束时间检索 -->
|
|
|
+ AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+</mapper>
|