From 72a254f120ae42780b77f873e4c4f3bf37345904 Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期三, 13 九月 2023 12:45:32 +0800
Subject: [PATCH] 修改雷达移动入侵报警按create_time逆序返回数据 修改电子围栏获取不按用户部门获取按用户关联获取
---
ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml | 1 +
ard-work/src/main/resources/mapper/alarmpoints/ArdWallMapper.xml | 9 +++++++++
ard-work/src/main/resources/mapper/app/ArdAppTaskMapper.xml | 1 +
ard-work/src/main/java/com/ruoyi/alarmpoints/wall/mapper/ArdWallMapper.java | 8 ++++++++
ard-work/src/main/java/com/ruoyi/app/position/service/impl/ArdAppPositionServiceImpl.java | 8 ++------
5 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/wall/mapper/ArdWallMapper.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/wall/mapper/ArdWallMapper.java
index 8b00b47..3e075a6 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/wall/mapper/ArdWallMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/wall/mapper/ArdWallMapper.java
@@ -84,4 +84,12 @@
* @return 缁撴灉
*/
public int deleteArdWallUserByWallIds(String[] ids);
+
+ /**
+ * 鏌ヨ鐢靛瓙鍥存爮绠$悊鍒楄〃鎸夊叧鑱旂敤鎴穒d
+ *
+ * @param userId 鍏宠仈鐢ㄦ埛id
+ * @return 鐢靛瓙鍥存爮绠$悊闆嗗悎
+ */
+ public List<ArdWall> selectArdWallListByUserId(String userId);
}
diff --git a/ard-work/src/main/java/com/ruoyi/app/position/service/impl/ArdAppPositionServiceImpl.java b/ard-work/src/main/java/com/ruoyi/app/position/service/impl/ArdAppPositionServiceImpl.java
index 5c227bb..8aead3f 100644
--- a/ard-work/src/main/java/com/ruoyi/app/position/service/impl/ArdAppPositionServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/app/position/service/impl/ArdAppPositionServiceImpl.java
@@ -238,12 +238,8 @@
List<ArdAlarmWall> ardAlarmWalls = new ArrayList<>();
//鑾峰彇褰撳墠鐢ㄦ埛鐨勯儴闂�
String userId = ardAppPosition.getUserId();
- SysUser sysUser = redisCache.getCacheObject("user_list:" + userId);
- Long deptId = sysUser.getDeptId();
- //鑾峰彇褰撳墠閮ㄩ棬鍙婂瓙閮ㄩ棬涓嬬殑鎵�鏈夌數瀛愬洿鏍�
- ArdWall ardWall = new ArdWall();
- ardWall.setDeptId(deptId);
- List<ArdWall> ardWalls = ardWallMapper.selectArdWallList(ardWall);
+ //鑾峰彇鐢ㄦ埛鍏宠仈鐨勬墍鏈夌數瀛愬洿鏍�
+ List<ArdWall> ardWalls = ardWallMapper.selectArdWallListByUserId(userId);
if (ardWalls.size() > 0) {
//閬嶅巻鎵�鏈夌數瀛愬洿鏍�
for (ArdWall wall : ardWalls) {
diff --git a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml b/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml
index bac5051..1648d93 100644
--- a/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarm/ArdAlarmRadarMoveMapper.xml
@@ -152,6 +152,7 @@
GROUP BY aar.NAME
) r
INNER JOIN ard_alarm_radar_move aaar ON r.create_time1 = aaar.create_time
+ ORDER BY aaar.create_time desc
</select>
<update id="updateViewTimeByCondition" parameterType="String">
update ard_alarm_radar_move
diff --git a/ard-work/src/main/resources/mapper/alarmpoints/ArdWallMapper.xml b/ard-work/src/main/resources/mapper/alarmpoints/ArdWallMapper.xml
index 813c2d8..5711613 100644
--- a/ard-work/src/main/resources/mapper/alarmpoints/ArdWallMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarmpoints/ArdWallMapper.xml
@@ -128,4 +128,13 @@
#{wallId}
</foreach>
</delete>
+ <select id="selectArdWallListByUserId" parameterType="String" resultMap="ArdWallResult">
+ SELECT
+ aw.*
+ FROM
+ ard_wall aw
+ LEFT JOIN ard_wall_user awu ON awu.wall_id = aw.ID
+ WHERE
+ awu.user_id = #{userId}
+ </select>
</mapper>
\ No newline at end of file
diff --git a/ard-work/src/main/resources/mapper/app/ArdAppTaskMapper.xml b/ard-work/src/main/resources/mapper/app/ArdAppTaskMapper.xml
index f002cdf..9b481cb 100644
--- a/ard-work/src/main/resources/mapper/app/ArdAppTaskMapper.xml
+++ b/ard-work/src/main/resources/mapper/app/ArdAppTaskMapper.xml
@@ -123,6 +123,7 @@
</if>
<if test="userId != null and userId != ''">and c.user_id = #{userId}</if>
</where>
+ order by c.create_time desc
</select>
<select id="selectArdAppTaskListWithDetail" parameterType="ArdAppTask" resultMap="ArdAppTaskSubResult">
--
Gitblit v1.9.3