From a152548db005be9227730a3166dc233d94a52c5f Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期四, 31 八月 2023 10:29:43 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/domain/ArdWallUser.java | 24 ++++
ard-work/src/main/java/com/ruoyi/test/Geo/GeofenceCallback.java | 14 ++
ard-work/src/main/java/com/ruoyi/dispatch/service/impl/ArdDispatchPoliceServiceImpl.java | 8 -
ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/domain/ArdWall.java | 16 ++
ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/service/impl/ArdWallServiceImpl.java | 45 ++++++
ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java | 13 ++
ard-work/src/main/resources/mapper/alarmpoints/ArdWallMapper.xml | 30 +++++
ard-work/src/main/java/com/ruoyi/utils/gis/GisUtil.java | 1
ard-work/src/main/java/com/ruoyi/test/Geo/Geofence.java | 42 +++++++
ard-work/src/main/java/com/ruoyi/test/Geo/GeofenceManager.java | 31 +++++
lib/mediamtx/mediamtx.yml | 2
ard-work/src/main/java/com/ruoyi/media/service/impl/MediaService.java | 8
ard-work/src/main/java/com/ruoyi/test/Geo/main.java | 52 ++++++++
ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/mapper/ArdWallMapper.java | 27 ++++
14 files changed, 294 insertions(+), 19 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/domain/ArdWall.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/domain/ArdWall.java
index 1aa5914..81cefa4 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/domain/ArdWall.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/domain/ArdWall.java
@@ -1,9 +1,12 @@
package com.ruoyi.alarmpoints.elecwall.domain;
+import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
+
+import java.util.List;
/**
* 鐢靛瓙鍥存爮绠$悊瀵硅薄 ard_wall
@@ -41,8 +44,19 @@
/** 鎵�灞炵敤鎴� */
@Excel(name = "鎵�灞炵敤鎴�")
private String userId;
+ /** 鍏宠仈鐢ㄦ埛鍒楄〃 */
+ @Excel(name = "鍏宠仈鐢ㄦ埛鍒楄〃")
+ List<SysUser> sysUserList;
- public void setId(String id)
+ public List<SysUser> getSysUserList() {
+ return sysUserList;
+ }
+
+ public void setSysUserList(List<SysUser> sysUserList) {
+ this.sysUserList = sysUserList;
+ }
+
+ public void setId(String id)
{
this.id = id;
}
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/domain/ArdWallUser.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/domain/ArdWallUser.java
new file mode 100644
index 0000000..eae4f4a
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/domain/ArdWallUser.java
@@ -0,0 +1,24 @@
+package com.ruoyi.alarmpoints.elecwall.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+/**
+ * 娲捐鍏宠仈鐢ㄦ埛瀵硅薄 ard_dispatch_police_user
+ *
+ * @author ard
+ * @date 2023-08-21
+ */
+@Data
+public class ArdWallUser
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 鍥存爮ID */
+ @Excel(name = "鍥存爮ID")
+ private String wallId;
+
+ /** 鍏宠仈鐢ㄦ埛ID */
+ @Excel(name = "鍏宠仈鐢ㄦ埛ID")
+ private String userId;
+}
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/mapper/ArdWallMapper.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/mapper/ArdWallMapper.java
index 1ac201a..4ff3dd4 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/mapper/ArdWallMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/mapper/ArdWallMapper.java
@@ -2,6 +2,8 @@
import java.util.List;
import com.ruoyi.alarmpoints.elecwall.domain.ArdWall;
+import com.ruoyi.alarmpoints.elecwall.domain.ArdWallUser;
+import com.ruoyi.dispatch.domain.ArdDispatchPoliceUser;
/**
* 鐢靛瓙鍥存爮绠$悊Mapper鎺ュ彛
@@ -58,4 +60,29 @@
* @return 缁撴灉
*/
public int deleteArdWallByIds(String[] ids);
+
+ /**
+ * 鎵归噺鏂板鍥存爮鍏宠仈鐢ㄦ埛
+ *
+ * @param ardWallUserList 鍥存爮鍏宠仈鐢ㄦ埛鍒楄〃
+ * @return 缁撴灉
+ */
+ public int batchArdWallUser(List<ArdWallUser> ardWallUserList);
+
+
+ /**
+ * 閫氳繃鍥存爮绠$悊涓婚敭鍒犻櫎娲捐鍏宠仈鐢ㄦ埛淇℃伅
+ *
+ * @param id 鍥存爮绠$悊ID
+ * @return 缁撴灉
+ */
+ public int deleteArdWallUserByWallId(String id);
+
+ /**
+ * 鎵归噺鍒犻櫎鍥存爮鍏宠仈鐢ㄦ埛
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deleteArdWallUserByWallIds(String[] ids);
}
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/service/impl/ArdWallServiceImpl.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/service/impl/ArdWallServiceImpl.java
index 124fea2..4840e3c 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/service/impl/ArdWallServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/elecwall/service/impl/ArdWallServiceImpl.java
@@ -1,9 +1,16 @@
package com.ruoyi.alarmpoints.elecwall.service.impl;
+import java.util.ArrayList;
import java.util.List;
+
+import com.ruoyi.alarmpoints.elecwall.domain.ArdWallUser;
+import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
+import com.ruoyi.dispatch.domain.ArdDispatchPolice;
+import com.ruoyi.dispatch.domain.ArdDispatchPoliceUser;
import org.springframework.stereotype.Service;
import com.ruoyi.alarmpoints.elecwall.mapper.ArdWallMapper;
import com.ruoyi.alarmpoints.elecwall.domain.ArdWall;
@@ -53,9 +60,11 @@
@Override
public int insertArdWall(ArdWall ardWall) {
ardWall.setId(IdUtils.simpleUUID());
- ardWall.setCreateBy(SecurityUtils.getUsername());
- ardWall.setCreateTime(DateUtils.getNowDate());
- return ardWallMapper.insertArdWall(ardWall);
+ ardWall.setCreateBy(SecurityUtils.getUsername());
+ ardWall.setCreateTime(DateUtils.getNowDate());
+ int i = ardWallMapper.insertArdWall(ardWall);
+ insertArdWallUser(ardWall);
+ return i;
}
/**
@@ -66,8 +75,10 @@
*/
@Override
public int updateArdWall(ArdWall ardWall) {
- ardWall.setUpdateBy(SecurityUtils.getUsername());
- ardWall.setUpdateTime(DateUtils.getNowDate());
+ ardWall.setUpdateBy(SecurityUtils.getUsername());
+ ardWall.setUpdateTime(DateUtils.getNowDate());
+ ardWallMapper.deleteArdWallUserByWallId(ardWall.getId());
+ insertArdWallUser(ardWall);
return ardWallMapper.updateArdWall(ardWall);
}
@@ -79,6 +90,7 @@
*/
@Override
public int deleteArdWallByIds(String[] ids) {
+ ardWallMapper.deleteArdWallUserByWallIds(ids);
return ardWallMapper.deleteArdWallByIds(ids);
}
@@ -90,6 +102,29 @@
*/
@Override
public int deleteArdWallById(String id) {
+ ardWallMapper.deleteArdWallUserByWallId(id);
return ardWallMapper.deleteArdWallById(id);
}
+
+ /**
+ * 鏂板鐢靛瓙鍥存爮鍏宠仈鐢ㄦ埛淇℃伅
+ *
+ * @param ardWall 鐢靛瓙鍥存爮绠$悊瀵硅薄
+ */
+ public void insertArdWallUser(ArdWall ardWall) {
+ List<SysUser> sysUserList = ardWall.getSysUserList();
+ String id = ardWall.getId();
+ if (StringUtils.isNotNull(sysUserList)) {
+ List<ArdWallUser> list = new ArrayList<ArdWallUser>();
+ for (SysUser user : sysUserList) {
+ ArdWallUser ardWallUser = new ArdWallUser();
+ ardWallUser.setWallId(id);
+ ardWallUser.setUserId(user.getUserId());
+ list.add(ardWallUser);
+ }
+ if (list.size() > 0) {
+ ardWallMapper.batchArdWallUser(list);
+ }
+ }
+ }
}
diff --git a/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java b/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java
index c6a0d8c..1fa38bd 100644
--- a/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java
+++ b/ard-work/src/main/java/com/ruoyi/app/position/controller/ArdAppPositionController.java
@@ -130,7 +130,17 @@
return AjaxResult.success(list);
}
-
+ /**
+ * 鑾峰彇鎵�鏈塧pp鐢ㄦ埛
+ */
+ @ApiOperation("鑾峰彇鎵�鏈塧pp鐢ㄦ埛")
+ @GetMapping("/getAppUserList")
+ public AjaxResult getAppUserList(Long deptId) {
+ SysUser user = new SysUser();
+ user.setDeptId(deptId);
+ List<SysUser> list = sysUserService.selectAllAppUserList(user);
+ return AjaxResult.success(list);
+ }
/**
* 鑾峰彇鎵�鏈塧pp鐢ㄦ埛
*/
@@ -186,6 +196,7 @@
lists.add(offlineMap);
return AjaxResult.success(lists);
}
+
/**
* 鑾峰彇鐢ㄦ埛璇︽儏
*/
diff --git a/ard-work/src/main/java/com/ruoyi/dispatch/service/impl/ArdDispatchPoliceServiceImpl.java b/ard-work/src/main/java/com/ruoyi/dispatch/service/impl/ArdDispatchPoliceServiceImpl.java
index b6df112..18dd7b0 100644
--- a/ard-work/src/main/java/com/ruoyi/dispatch/service/impl/ArdDispatchPoliceServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/dispatch/service/impl/ArdDispatchPoliceServiceImpl.java
@@ -83,8 +83,7 @@
public int updateArdDispatchPolice(ArdDispatchPolice ardDispatchPolice) {
ardDispatchPolice.setUpdateBy(SecurityUtils.getUsername());
ardDispatchPolice.setUpdateTime(DateUtils.getNowDate());
- ardDispatchPoliceMapper.deleteArdDispatchPoliceUserByDispatchId(ardDispatchPolice.getId())
- ;
+ ardDispatchPoliceMapper.deleteArdDispatchPoliceUserByDispatchId(ardDispatchPolice.getId());
insertArdDispatchPoliceUser(ardDispatchPolice);
return ardDispatchPoliceMapper.updateArdDispatchPolice(ardDispatchPolice);
}
@@ -115,11 +114,6 @@
return ardDispatchPoliceMapper.deleteArdDispatchPoliceById(id);
}
- /**
- * 鏂板娲捐鍏宠仈鐢ㄦ埛淇℃伅
- *
- * @param ardDispatchPolice 娲捐绠$悊瀵硅薄
- */
/**
* 鏂板娲捐鍏宠仈鐢ㄦ埛淇℃伅
*
diff --git a/ard-work/src/main/java/com/ruoyi/media/service/impl/MediaService.java b/ard-work/src/main/java/com/ruoyi/media/service/impl/MediaService.java
index c9bc8b8..a122234 100644
--- a/ard-work/src/main/java/com/ruoyi/media/service/impl/MediaService.java
+++ b/ard-work/src/main/java/com/ruoyi/media/service/impl/MediaService.java
@@ -109,9 +109,9 @@
//GPU纭В鐮佺紪鐮� -hwaccel cuvid -c:v h264_cuvid 浣跨敤cuda瑙g爜 -c:v h264_nvenc 浣跨敤cuda缂栫爜
//String cmd = rootPath + "/lib/mediamtx/" + "ffmpeg -hwaccel cuvid -c:v h264_cuvid -rtsp_transport udp -i " + rtspPath + " -c:v h264_nvenc -r 25 -threads 4 -b:v 2048k -bf 0 -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH";
if (isCode.equals("1")) {
- String cmd = rootPath + "/lib/mediamtx/" + "ffmpeg -rtsp_transport tcp -i " + rtspPath + " -vcodec libx264 -preset:v ultrafast -r 25 -threads 4 -b:v 2048k -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH";
+ String cmd = rootPath + "/lib/mediamtx/" + "ffmpeg -rtsp_transport tcp -i " + rtspPath + " -vcodec libx264 -preset:v ultrafast -r 25 -threads 6 -b:v 1024k -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH";
if (!softwareDecoding) {
- cmd = rootPath + "/lib/mediamtx/" + "ffmpeg -hwaccel cuvid -c:v h264_cuvid -rtsp_transport udp -i " + rtspPath + " -c:v h264_nvenc -r 25 -threads 4 -b:v 2048k -bf 0 -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH";
+ cmd = rootPath + "/lib/mediamtx/" + "ffmpeg -hwaccel cuvid -c:v h264_cuvid -rtsp_transport tcp -i " + rtspPath + " -c:v h264_nvenc -r 25 -threads 6 -b:v 2048k -bf 0 -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH";
}
if (mode.equals("1")) {
mediaInfo.setRunondemand(cmd);
@@ -123,7 +123,7 @@
} else {
mediaInfo.setSource(rtspPath);
}
- mediaInfo.setSourceprotocol("udp");
+ mediaInfo.setSourceprotocol("tcp");
mediaClient.addPath(name, mediaInfo);
return rtspUrl;
}
@@ -141,7 +141,7 @@
info.setMode("1");
} else {
runoninit = item.getConf().getRunoninit();
- info.setMode("2");
+ info.setMode("0");
}
//RTSP婧愬湴鍧�
String regex = "rtsp://[^\\s\"]+";
diff --git a/ard-work/src/main/java/com/ruoyi/test/Geo/Geofence.java b/ard-work/src/main/java/com/ruoyi/test/Geo/Geofence.java
new file mode 100644
index 0000000..6e6435b
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/test/Geo/Geofence.java
@@ -0,0 +1,42 @@
+package com.ruoyi.test.Geo;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.utils.gis.GisUtil;
+import com.ruoyi.utils.gis.Point;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @Description: 鐢靛瓙鏍呮爮
+ * @ClassName: Geofence
+ * @Author: 鍒樿嫃涔�
+ * @Date: 2023骞�08鏈�30鏃�9:53:53
+ **/
+@Data
+public class Geofence {
+ private String id;
+ private List<Point> vertices;//椤剁偣鍧愭爣闆嗗悎
+ private GeofenceCallback callback;//鍥存爮鍥炶皟
+
+ public Geofence(String id,List<Point> vertices, GeofenceCallback callback) {
+ this.id=id;
+ this.vertices = vertices;
+ this.callback = callback;
+ }
+
+ public boolean isInside(Point point) {
+ // 瀹炵幇鍧愭爣鏄惁鍦ㄥ洿鏍忓唴鐨勬娴嬮�昏緫
+ // 杩斿洖 true 濡傛灉鍦ㄥ洿鏍忓唴锛屽惁鍒欒繑鍥� false
+ boolean inPolygon = GisUtil.isInPolygon(point, vertices);
+ return inPolygon ? true : false;
+ }
+
+ public void checkAndTrigger(String id,Point point, SysUser user) {
+ if (isInside(point)) {
+ callback.onEnter(id,user);
+ } else {
+ callback.onExit(id,user);
+ }
+ }
+}
diff --git a/ard-work/src/main/java/com/ruoyi/test/Geo/GeofenceCallback.java b/ard-work/src/main/java/com/ruoyi/test/Geo/GeofenceCallback.java
new file mode 100644
index 0000000..df9ede0
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/test/Geo/GeofenceCallback.java
@@ -0,0 +1,14 @@
+package com.ruoyi.test.Geo;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+
+/**
+ * @Description: 鐢靛瓙鍥存爮鍥炶皟
+ * @ClassName: GeofenceCallback
+ * @Author: 鍒樿嫃涔�
+ * @Date: 2023骞�08鏈�30鏃�9:53:14
+ **/
+public interface GeofenceCallback {
+ void onEnter(String id,SysUser user);
+ void onExit(String id,SysUser user);
+}
diff --git a/ard-work/src/main/java/com/ruoyi/test/Geo/GeofenceManager.java b/ard-work/src/main/java/com/ruoyi/test/Geo/GeofenceManager.java
new file mode 100644
index 0000000..2f79c26
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/test/Geo/GeofenceManager.java
@@ -0,0 +1,31 @@
+package com.ruoyi.test.Geo;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.utils.gis.Point;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description: 鐢靛瓙鍥存爮绠$悊鍣�
+ * @ClassName: GeofenceManager
+ * @Author: 鍒樿嫃涔�
+ * @Date: 2023骞�08鏈�30鏃�9:54:34
+ **/
+class GeofenceManager {
+ private List<Geofence> geofences;
+
+ public GeofenceManager() {
+ geofences = new ArrayList<>();
+ }
+
+ public void addGeofence(Geofence geofence) {
+ geofences.add(geofence);
+ }
+
+ public void checkCoordinates(Point coordinates, SysUser user) {
+ for (Geofence geofence : geofences) {
+ geofence.checkAndTrigger(geofence.getId(),coordinates,user);
+ }
+ }
+}
\ No newline at end of file
diff --git a/ard-work/src/main/java/com/ruoyi/test/Geo/main.java b/ard-work/src/main/java/com/ruoyi/test/Geo/main.java
new file mode 100644
index 0000000..3166f85
--- /dev/null
+++ b/ard-work/src/main/java/com/ruoyi/test/Geo/main.java
@@ -0,0 +1,52 @@
+package com.ruoyi.test.Geo;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.utils.gis.Point;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description:
+ * @ClassName: main
+ * @Author: 鍒樿嫃涔�
+ * @Date: 2023骞�08鏈�30鏃�9:55:12
+ **/
+class Main {
+ public static void main(String[] args) {
+ GeofenceManager geofenceManager = new GeofenceManager();
+
+ GeofenceCallback geofenceCallback= new GeofenceCallback() {
+ @Override
+ public void onEnter(String id,SysUser user) {
+ System.out.println("鐢ㄦ埛" + user.getUserId() + "杩涘叆鐢靛瓙鍥存爮" + id + "鍖哄煙锛岃Е鍙戞姤璀︼紒");
+ }
+
+ @Override
+ public void onExit(String id,SysUser user) {
+ System.out.println("鐢ㄦ埛" + user.getUserId() + "鏈湪鐢靛瓙鍥存爮" + id + "鍖哄煙銆�");
+ }
+ };
+
+ List<Point> polygonVertices = new ArrayList<>();
+ polygonVertices.add(new Point(126.6491, 45.739108));
+ polygonVertices.add(new Point(126.643458, 45.731584));
+ polygonVertices.add(new Point(126.654921, 45.726979));
+ polygonVertices.add(new Point(126.660742, 45.734956));
+ Geofence geofence = new Geofence("1",polygonVertices, geofenceCallback);
+ geofenceManager.addGeofence(geofence);
+
+ List<Point> polygonVertices1 = new ArrayList<>();
+ polygonVertices1.add(new Point(126.655244,45.726576));
+ polygonVertices1.add(new Point(126.67242,45.720586));
+ polygonVertices1.add(new Point(126.679606,45.729143));
+ polygonVertices1.add(new Point(126.660993,45.734881));
+ Geofence geofence1 = new Geofence("2",polygonVertices1,geofenceCallback);
+ geofenceManager.addGeofence(geofence1);
+
+ Point userCoordinates = new Point(126.666455,45.727986);
+ SysUser user = new SysUser();
+ user.setUserId("55555");
+ geofenceManager.checkCoordinates(userCoordinates, user);
+ }
+}
\ No newline at end of file
diff --git a/ard-work/src/main/java/com/ruoyi/utils/gis/GisUtil.java b/ard-work/src/main/java/com/ruoyi/utils/gis/GisUtil.java
index 3aafe29..8c669d5 100644
--- a/ard-work/src/main/java/com/ruoyi/utils/gis/GisUtil.java
+++ b/ard-work/src/main/java/com/ruoyi/utils/gis/GisUtil.java
@@ -108,6 +108,7 @@
}
return IsPtInPoly(point,pointList);
}
+
/**
* 鍒ゆ柇鐐规槸鍚﹀湪澶氳竟褰㈠唴锛屽鏋滅偣浣嶄簬澶氳竟褰㈢殑椤剁偣鎴栬竟涓婏紝涔熺畻鍋氱偣鍦ㄥ杈瑰舰鍐咃紝鐩存帴杩斿洖true
* @param point 妫�娴嬬偣
diff --git a/ard-work/src/main/resources/mapper/alarmpoints/ArdWallMapper.xml b/ard-work/src/main/resources/mapper/alarmpoints/ArdWallMapper.xml
index 68933d9..53d55fe 100644
--- a/ard-work/src/main/resources/mapper/alarmpoints/ArdWallMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarmpoints/ArdWallMapper.xml
@@ -16,6 +16,19 @@
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
+ <!-- 瀛愭煡璇紝鍏宠仈 ard_dispatch_police_user 琛� -->
+ <collection property="sysUserList" ofType="java.util.List" select="getSysUserListByMainTableId" column="id"/>
+ </resultMap>
+ <select id="getSysUserListByMainTableId" resultType="SysUser">
+ SELECT u.*
+ FROM ard_wall_user b
+ left join sys_user u on b.user_id = u.user_id
+ WHERE wall_id = #{id}
+ </select>
+ <resultMap type="SysUser" id="SysUserListResult">
+ <result property="userId" column="sub_user_id"/>
+ <result property="nickName" column="sub_nick_name"/>
+ <result property="deptId" column="sub_dept_id"/>
</resultMap>
<sql id="selectArdWallVo">
@@ -96,4 +109,21 @@
#{id}
</foreach>
</delete>
+ <insert id="batchArdWallUser">
+ insert into ard_wall_user( wall_id, user_id) values
+ <foreach item="item" index="index" collection="list" separator=",">
+ ( #{item.wallId}, #{item.userId})
+ </foreach>
+ </insert>
+ <delete id="deleteArdWallUserByWallId" parameterType="String">
+ delete
+ from ard_wall_user
+ where wall_id = #{wallId}
+ </delete>
+ <delete id="deleteArdWallUserByWallIds" parameterType="String">
+ delete from ard_wall_user where wall_id in
+ <foreach item="wallId" collection="array" open="(" separator="," close=")">
+ #{wallId}
+ </foreach>
+ </delete>
</mapper>
\ No newline at end of file
diff --git a/lib/mediamtx/mediamtx.yml b/lib/mediamtx/mediamtx.yml
index 50ec5fa..9598640 100644
--- a/lib/mediamtx/mediamtx.yml
+++ b/lib/mediamtx/mediamtx.yml
@@ -206,7 +206,7 @@
# STUN servers are used to obtain the public IP of server and clients. They are
# needed when server and clients are on different LANs.
# TURN/TURNS servers are needed when a direct connection between server and
- # clients is not possible. All traffic is routed through them.
+ # clients is not possible. All traffic is routed through them. stun:stun.l.google.com:19302
- url: stun:stun.l.google.com:19302
# if user is "AUTH_SECRET", then authentication is secret based.
# the secret must be inserted into the password field.
--
Gitblit v1.9.3