|
|
|
@ -3,200 +3,76 @@
@@ -3,200 +3,76 @@
|
|
|
|
|
<mapper namespace="com.cloud.kicc.system.mapper.UserMapper"> |
|
|
|
|
|
|
|
|
|
<select id="getCourierUserList" resultType="com.cloud.kicc.common.data.entity.KiccUser"> |
|
|
|
|
select |
|
|
|
|
u.id, |
|
|
|
|
csu.id cas_user_id, |
|
|
|
|
csu.user_name, |
|
|
|
|
csu.nick_name, |
|
|
|
|
csu.password, |
|
|
|
|
csu.email, |
|
|
|
|
csu.phone, |
|
|
|
|
csu.sex, |
|
|
|
|
csu.avatar, |
|
|
|
|
csu.login_ip, |
|
|
|
|
csu.login_time, |
|
|
|
|
u.user_type, |
|
|
|
|
u.dept_id, |
|
|
|
|
u.dept_name, |
|
|
|
|
u.status, |
|
|
|
|
u.map_orientation, |
|
|
|
|
u.map_center, |
|
|
|
|
u.create_by_id, |
|
|
|
|
u.create_by_name, |
|
|
|
|
u.create_time, |
|
|
|
|
u.update_by_id, |
|
|
|
|
u.update_by_name, |
|
|
|
|
u.update_time, |
|
|
|
|
csu.remarks, |
|
|
|
|
csu.tenant_id, |
|
|
|
|
u.del_flag |
|
|
|
|
from |
|
|
|
|
sys_user u |
|
|
|
|
inner join |
|
|
|
|
remote_cas_sso_user csu |
|
|
|
|
on u.cas_user_id = csu.id |
|
|
|
|
select * from sso_enhanced_user_view |
|
|
|
|
where |
|
|
|
|
(select count(1) from common_map_logistic m where m.courier_user_id = csu.id) = 0 |
|
|
|
|
and u.del_flag = 0 |
|
|
|
|
and u.user_type = '3' |
|
|
|
|
(select count(1) from common_map_logistic where courier_user_id = id) = 0 |
|
|
|
|
and del_flag = 0 |
|
|
|
|
and user_type = '3' |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="selectUserList" resultType="com.cloud.kicc.common.data.entity.KiccUser"> |
|
|
|
|
select |
|
|
|
|
u.id, |
|
|
|
|
csu.id cas_user_id, |
|
|
|
|
csu.user_name, |
|
|
|
|
csu.nick_name, |
|
|
|
|
csu.password, |
|
|
|
|
csu.email, |
|
|
|
|
csu.phone, |
|
|
|
|
csu.sex, |
|
|
|
|
csu.avatar, |
|
|
|
|
csu.login_ip, |
|
|
|
|
csu.login_time, |
|
|
|
|
u.user_type, |
|
|
|
|
u.dept_id, |
|
|
|
|
u.dept_name, |
|
|
|
|
u.status, |
|
|
|
|
u.map_orientation, |
|
|
|
|
u.map_center, |
|
|
|
|
u.create_by_id, |
|
|
|
|
u.create_by_name, |
|
|
|
|
u.create_time, |
|
|
|
|
u.update_by_id, |
|
|
|
|
u.update_by_name, |
|
|
|
|
u.update_time, |
|
|
|
|
csu.remarks, |
|
|
|
|
csu.tenant_id, |
|
|
|
|
u.del_flag |
|
|
|
|
from |
|
|
|
|
sys_user u |
|
|
|
|
inner join |
|
|
|
|
remote_cas_sso_user csu |
|
|
|
|
on u.cas_user_id = csu.id |
|
|
|
|
select * from sso_enhanced_user_view |
|
|
|
|
<where> |
|
|
|
|
u.del_flag = 0 |
|
|
|
|
del_flag = 0 |
|
|
|
|
<if test="param.userName != null and param.userName != ''"> |
|
|
|
|
and csu.user_name like concat('%', #{param.userName}, '%') |
|
|
|
|
and user_name like concat('%', #{param.userName}, '%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.nickName != null and param.nickName != ''"> |
|
|
|
|
and csu.nick_name like concat('%', #{param.nickName}, '%') |
|
|
|
|
and nick_name like concat('%', #{param.nickName}, '%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deptId != null and param.deptId != ''"> |
|
|
|
|
and u.dept_id = #{param.deptId} |
|
|
|
|
and dept_id = #{param.deptId} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.id != null and param.id != ''"> |
|
|
|
|
and u.id = #{param.id} |
|
|
|
|
and id = #{param.id} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.casUserId != null and param.casUserId != ''"> |
|
|
|
|
and csu.id = #{param.casUserId} |
|
|
|
|
and cas_user_id = #{param.casUserId} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.userType != null and param.userType != ''"> |
|
|
|
|
and u.user_type = #{param.userType} |
|
|
|
|
and user_type = #{param.userType} |
|
|
|
|
</if> |
|
|
|
|
<if test="(param.beginTime != null and param.beginTime != '') and (param.endTime != null and param.endTime != '')"> |
|
|
|
|
and u.create_time between #{param.beginTime} and #{param.endTime} |
|
|
|
|
and create_time between #{param.beginTime} and #{param.endTime} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
order by u.create_time asc |
|
|
|
|
order by create_time asc |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getUserByParam" resultType="com.cloud.kicc.common.data.entity.KiccUser"> |
|
|
|
|
select |
|
|
|
|
u.id, |
|
|
|
|
csu.id cas_user_id, |
|
|
|
|
csu.user_name, |
|
|
|
|
csu.nick_name, |
|
|
|
|
csu.password, |
|
|
|
|
csu.email, |
|
|
|
|
csu.phone, |
|
|
|
|
csu.sex, |
|
|
|
|
csu.avatar, |
|
|
|
|
csu.login_ip, |
|
|
|
|
csu.login_time, |
|
|
|
|
u.user_type, |
|
|
|
|
u.dept_id, |
|
|
|
|
u.dept_name, |
|
|
|
|
u.status, |
|
|
|
|
u.map_orientation, |
|
|
|
|
u.map_center, |
|
|
|
|
u.create_by_id, |
|
|
|
|
u.create_by_name, |
|
|
|
|
u.create_time, |
|
|
|
|
u.update_by_id, |
|
|
|
|
u.update_by_name, |
|
|
|
|
u.update_time, |
|
|
|
|
csu.remarks, |
|
|
|
|
csu.tenant_id, |
|
|
|
|
u.del_flag |
|
|
|
|
from |
|
|
|
|
sys_user u |
|
|
|
|
inner join |
|
|
|
|
remote_cas_sso_user csu |
|
|
|
|
on u.cas_user_id = csu.id |
|
|
|
|
select * from sso_enhanced_user_view |
|
|
|
|
<where> |
|
|
|
|
u.del_flag = 0 |
|
|
|
|
del_flag = 0 |
|
|
|
|
<if test="userName != null and userName != ''"> |
|
|
|
|
and csu.user_name = #{userName} |
|
|
|
|
and user_name = #{userName} |
|
|
|
|
</if> |
|
|
|
|
<if test="nickName != null and nickName != ''"> |
|
|
|
|
and csu.nick_name = #{nickName} |
|
|
|
|
and nick_name = #{nickName} |
|
|
|
|
</if> |
|
|
|
|
<if test="deptId != null and deptId != ''"> |
|
|
|
|
and u.dept_id = #{deptId} |
|
|
|
|
and dept_id = #{deptId} |
|
|
|
|
</if> |
|
|
|
|
<if test="id != null and id != ''"> |
|
|
|
|
and u.id = #{id} |
|
|
|
|
and id = #{id} |
|
|
|
|
</if> |
|
|
|
|
<if test="casUserId != null and casUserId != ''"> |
|
|
|
|
and csu.id = #{casUserId} |
|
|
|
|
and cas_user_id = #{casUserId} |
|
|
|
|
</if> |
|
|
|
|
<if test="userType != null and userType != ''"> |
|
|
|
|
and u.user_type = #{userType} |
|
|
|
|
and user_type = #{userType} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="getUserByParamList" resultType="com.cloud.kicc.common.data.entity.KiccUser"> |
|
|
|
|
select |
|
|
|
|
u.id, |
|
|
|
|
csu.id cas_user_id, |
|
|
|
|
csu.user_name, |
|
|
|
|
csu.nick_name, |
|
|
|
|
csu.password, |
|
|
|
|
csu.email, |
|
|
|
|
csu.phone, |
|
|
|
|
csu.sex, |
|
|
|
|
csu.avatar, |
|
|
|
|
csu.login_ip, |
|
|
|
|
csu.login_time, |
|
|
|
|
u.user_type, |
|
|
|
|
u.dept_id, |
|
|
|
|
u.dept_name, |
|
|
|
|
u.status, |
|
|
|
|
u.map_orientation, |
|
|
|
|
u.map_center, |
|
|
|
|
u.create_by_id, |
|
|
|
|
u.create_by_name, |
|
|
|
|
u.create_time, |
|
|
|
|
u.update_by_id, |
|
|
|
|
u.update_by_name, |
|
|
|
|
u.update_time, |
|
|
|
|
csu.remarks, |
|
|
|
|
csu.tenant_id, |
|
|
|
|
u.del_flag |
|
|
|
|
from |
|
|
|
|
sys_user u |
|
|
|
|
inner join |
|
|
|
|
remote_cas_sso_user csu |
|
|
|
|
on u.cas_user_id = csu.id |
|
|
|
|
select * from sso_enhanced_user_view |
|
|
|
|
<where> |
|
|
|
|
u.del_flag = 0 |
|
|
|
|
del_flag = 0 |
|
|
|
|
<if test="phone != null and phone != ''"> |
|
|
|
|
and csu.phone = #{phone} |
|
|
|
|
and phone = #{phone} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
order by u.create_time asc |
|
|
|
|
order by create_time asc |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
|
|