From 97f4a9b9621eca21da79df727121f5fac12cc42a Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期一, 22 一月 2024 10:01:41 +0800
Subject: [PATCH] app单兵端发起查看指挥端位置及车辆位置提交
---
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 48 insertions(+), 1 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 8e1754c..18bfb26 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -50,6 +50,31 @@
<result property="status" column="role_status"/>
</resultMap>
+ <resultMap type="SysUser" id="SysUserOnlyResult">
+ <id property="userId" column="user_id"/>
+ <result property="deptId" column="dept_id"/>
+ <result property="userName" column="user_name"/>
+ <result property="nickName" column="nick_name"/>
+ <result property="email" column="email"/>
+ <result property="phonenumber" column="phonenumber"/>
+ <result property="sex" column="sex"/>
+ <result property="avatar" column="avatar"/>
+ <result property="password" column="password"/>
+ <result property="status" column="status"/>
+ <result property="delFlag" column="del_flag"/>
+ <result property="loginIp" column="login_ip"/>
+ <result property="loginDate" column="login_date"/>
+ <result property="createBy" column="create_by"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="updateTime" column="update_time"/>
+ <result property="cameraPriority" column="camera_priority"/>
+ <result property="rongCloudToken" column="rong_cloud_token"/>
+ <result property="appUserType" column="app_user_type"/>
+ <result property="appOnlineState" column="app_online_state"/>
+ <result property="remark" column="remark"/>
+ </resultMap>
+
<sql id="selectUserVo">
select u.user_id,
u.dept_id,
@@ -293,6 +318,28 @@
</select>
<select id="userByPlanId" parameterType="String" resultMap="SysUserResult">
- select nick_name from sys_user where id in (select app_user_id from ard_app_patroluser where patrolplan_id = ${id})
+ select user_id,nick_name from sys_user where user_id in (select app_user_id from ard_app_patroluser where patrolplan_id = #{id})
+ </select>
+
+ <select id="getOnlineCommander" parameterType="String" resultMap="SysUserOnlyResult">
+ select distinct su0.* from sys_user su
+ inner join sys_user su0 on su.dept_id = su0.dept_id
+ inner join sys_user_role aur on su0.user_id = aur.user_id
+ inner join sys_role sr on aur.role_id = sr.role_id
+ where su.user_id = #{usersId} and su0.user_id != #{usersId}
+ and sr.role_key = 'appLeader' and su0.app_online_state = '1'
+ </select>
+
+ <select id="getOnlinePC" resultMap="SysUserOnlyResult">
+ select distinct su0.* from sys_user su
+ inner join sys_user su0 on su.dept_id = su0.dept_id
+ inner join sys_user_role aur on su0.user_id = aur.user_id
+ inner join sys_role sr on aur.role_id = sr.role_id
+ where su.user_id = #{usersId} and su0.user_id != #{usersId}
+ and sr.role_key != 'appLeader' and sr.role_key != 'appUser'
+ and su0.user_id in
+ <foreach collection="onLinePCIdList" item="userId" open="(" close=")" separator=",">
+ #{userId}
+ </foreach>
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3