From 3c450768402293d86350e8420f365210c83233fa Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期一, 30 十月 2023 13:28:24 +0800
Subject: [PATCH] 修改禁引可视域
---
ard-work/src/main/java/com/ruoyi/device/noguidezone/domain/ArdCameraNoGuideZone.java | 32 +++++-----
ard-work/src/main/java/com/ruoyi/device/noguidezone/service/IArdCameraNoGuideZoneService.java | 14 ++--
ard-work/src/main/java/com/ruoyi/device/noguidezone/mapper/ArdCameraNoGuideZoneMapper.java | 14 ++--
ard-work/src/main/java/com/ruoyi/device/noguidezone/controller/ArdCameraNoGuideZoneController.java | 14 ++--
ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java | 1
ard-work/src/main/java/com/ruoyi/device/noguidezone/service/impl/ArdCameraNoGuideZoneServiceImpl.java | 22 +++---
ard-work/src/main/resources/mapper/device/ArdCameraNoGuideZoneMapper.xml | 30 +++++-----
7 files changed, 64 insertions(+), 63 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java b/ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java
index e3904b4..52b4eec 100644
--- a/ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java
+++ b/ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java
@@ -11,6 +11,7 @@
import com.ruoyi.device.camera.domain.CameraCmd;
import com.ruoyi.device.camera.service.IArdCamerasService;
import com.ruoyi.device.camera.service.ICameraSdkService;
+
import com.ruoyi.device.noguidezone.domain.ArdCameraNoGuideZone;
import com.ruoyi.device.noguidezone.service.IArdCameraNoGuideZoneService;
import com.ruoyi.utils.gis.GisUtil;
diff --git a/ard-work/src/main/java/com/ruoyi/device/noguidezone/controller/ArdCameraNoGuideZoneController.java b/ard-work/src/main/java/com/ruoyi/device/noguidezone/controller/ArdCameraNoGuideZoneController.java
index d19e78d..0d24d71 100644
--- a/ard-work/src/main/java/com/ruoyi/device/noguidezone/controller/ArdCameraNoGuideZoneController.java
+++ b/ard-work/src/main/java/com/ruoyi/device/noguidezone/controller/ArdCameraNoGuideZoneController.java
@@ -28,7 +28,7 @@
* 绂佸紩鍙鍩烠ontroller
*
* @author ard
- * @date 2023-10-27
+ * @date 2023-10-28
*/
@Api(tags = "绂佸紩鍙鍩熺鐞嗘帴鍙�")
@RestController
@@ -69,10 +69,10 @@
*/
@ApiOperation("鑾峰彇绂佸紩鍙鍩熻缁嗕俊鎭�")
@PreAuthorize("@ss.hasPermi('device:noguidezone:query')")
- @GetMapping(value = "/{name}")
- public AjaxResult getInfo(@PathVariable("name") String name)
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") String id)
{
- return success(ardCameraNoGuideZoneService.selectArdCameraNoGuideZoneByName(name));
+ return success(ardCameraNoGuideZoneService.selectArdCameraNoGuideZoneById(id));
}
/**
@@ -105,9 +105,9 @@
@ApiOperation("鍒犻櫎绂佸紩鍙鍩�")
@PreAuthorize("@ss.hasPermi('device:noguidezone:remove')")
@Log(title = "绂佸紩鍙鍩�", businessType = BusinessType.DELETE)
- @DeleteMapping("/{names}")
- public AjaxResult remove(@PathVariable String[] names)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable String[] ids)
{
- return toAjax(ardCameraNoGuideZoneService.deleteArdCameraNoGuideZoneByNames(names));
+ return toAjax(ardCameraNoGuideZoneService.deleteArdCameraNoGuideZoneByIds(ids));
}
}
diff --git a/ard-work/src/main/java/com/ruoyi/device/noguidezone/domain/ArdCameraNoGuideZone.java b/ard-work/src/main/java/com/ruoyi/device/noguidezone/domain/ArdCameraNoGuideZone.java
index 1c85b51..cbf6fda 100644
--- a/ard-work/src/main/java/com/ruoyi/device/noguidezone/domain/ArdCameraNoGuideZone.java
+++ b/ard-work/src/main/java/com/ruoyi/device/noguidezone/domain/ArdCameraNoGuideZone.java
@@ -9,11 +9,14 @@
* 绂佸紩鍙鍩熷璞� ard_camera_no_guide_zone
*
* @author ard
- * @date 2023-10-27
+ * @date 2023-10-28
*/
public class ArdCameraNoGuideZone extends BaseEntity
{
private static final long serialVersionUID = 1L;
+
+ /** id */
+ private String id;
/** 鍚嶇О */
@Excel(name = "鍚嶇О")
@@ -33,15 +36,21 @@
/** 閮ㄩ棬ID */
@Excel(name = "閮ㄩ棬ID")
- private Long deptId;
+ private String deptId;
/** 鐢ㄦ埛ID */
@Excel(name = "鐢ㄦ埛ID")
private String userId;
- /** id */
- private String id;
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+ public String getId()
+ {
+ return id;
+ }
public void setName(String name)
{
this.name = name;
@@ -78,12 +87,12 @@
{
return enabled;
}
- public void setDeptId(Long deptId)
+ public void setDeptId(String deptId)
{
this.deptId = deptId;
}
- public Long getDeptId()
+ public String getDeptId()
{
return deptId;
}
@@ -96,19 +105,11 @@
{
return userId;
}
- public void setId(String id)
- {
- this.id = id;
- }
-
- public String getId()
- {
- return id;
- }
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
.append("name", getName())
.append("poi", getPoi())
.append("cameraId", getCameraId())
@@ -119,7 +120,6 @@
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
- .append("id", getId())
.toString();
}
}
diff --git a/ard-work/src/main/java/com/ruoyi/device/noguidezone/mapper/ArdCameraNoGuideZoneMapper.java b/ard-work/src/main/java/com/ruoyi/device/noguidezone/mapper/ArdCameraNoGuideZoneMapper.java
index 5e0fe53..b2a8e0c 100644
--- a/ard-work/src/main/java/com/ruoyi/device/noguidezone/mapper/ArdCameraNoGuideZoneMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/device/noguidezone/mapper/ArdCameraNoGuideZoneMapper.java
@@ -7,17 +7,17 @@
* 绂佸紩鍙鍩烳apper鎺ュ彛
*
* @author ard
- * @date 2023-10-27
+ * @date 2023-10-28
*/
public interface ArdCameraNoGuideZoneMapper
{
/**
* 鏌ヨ绂佸紩鍙鍩�
*
- * @param name 绂佸紩鍙鍩熶富閿�
+ * @param id 绂佸紩鍙鍩熶富閿�
* @return 绂佸紩鍙鍩�
*/
- public ArdCameraNoGuideZone selectArdCameraNoGuideZoneByName(String name);
+ public ArdCameraNoGuideZone selectArdCameraNoGuideZoneById(String id);
/**
* 鏌ヨ绂佸紩鍙鍩熷垪琛�
@@ -46,16 +46,16 @@
/**
* 鍒犻櫎绂佸紩鍙鍩�
*
- * @param name 绂佸紩鍙鍩熶富閿�
+ * @param id 绂佸紩鍙鍩熶富閿�
* @return 缁撴灉
*/
- public int deleteArdCameraNoGuideZoneByName(String name);
+ public int deleteArdCameraNoGuideZoneById(String id);
/**
* 鎵归噺鍒犻櫎绂佸紩鍙鍩�
*
- * @param names 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
* @return 缁撴灉
*/
- public int deleteArdCameraNoGuideZoneByNames(String[] names);
+ public int deleteArdCameraNoGuideZoneByIds(String[] ids);
}
diff --git a/ard-work/src/main/java/com/ruoyi/device/noguidezone/service/IArdCameraNoGuideZoneService.java b/ard-work/src/main/java/com/ruoyi/device/noguidezone/service/IArdCameraNoGuideZoneService.java
index 6ec3b33..3dc1608 100644
--- a/ard-work/src/main/java/com/ruoyi/device/noguidezone/service/IArdCameraNoGuideZoneService.java
+++ b/ard-work/src/main/java/com/ruoyi/device/noguidezone/service/IArdCameraNoGuideZoneService.java
@@ -7,17 +7,17 @@
* 绂佸紩鍙鍩烻ervice鎺ュ彛
*
* @author ard
- * @date 2023-10-27
+ * @date 2023-10-28
*/
public interface IArdCameraNoGuideZoneService
{
/**
* 鏌ヨ绂佸紩鍙鍩�
*
- * @param name 绂佸紩鍙鍩熶富閿�
+ * @param id 绂佸紩鍙鍩熶富閿�
* @return 绂佸紩鍙鍩�
*/
- public ArdCameraNoGuideZone selectArdCameraNoGuideZoneByName(String name);
+ public ArdCameraNoGuideZone selectArdCameraNoGuideZoneById(String id);
/**
* 鏌ヨ绂佸紩鍙鍩熷垪琛�
@@ -46,16 +46,16 @@
/**
* 鎵归噺鍒犻櫎绂佸紩鍙鍩�
*
- * @param names 闇�瑕佸垹闄ょ殑绂佸紩鍙鍩熶富閿泦鍚�
+ * @param ids 闇�瑕佸垹闄ょ殑绂佸紩鍙鍩熶富閿泦鍚�
* @return 缁撴灉
*/
- public int deleteArdCameraNoGuideZoneByNames(String[] names);
+ public int deleteArdCameraNoGuideZoneByIds(String[] ids);
/**
* 鍒犻櫎绂佸紩鍙鍩熶俊鎭�
*
- * @param name 绂佸紩鍙鍩熶富閿�
+ * @param id 绂佸紩鍙鍩熶富閿�
* @return 缁撴灉
*/
- public int deleteArdCameraNoGuideZoneByName(String name);
+ public int deleteArdCameraNoGuideZoneById(String id);
}
diff --git a/ard-work/src/main/java/com/ruoyi/device/noguidezone/service/impl/ArdCameraNoGuideZoneServiceImpl.java b/ard-work/src/main/java/com/ruoyi/device/noguidezone/service/impl/ArdCameraNoGuideZoneServiceImpl.java
index 621b003..cd48e31 100644
--- a/ard-work/src/main/java/com/ruoyi/device/noguidezone/service/impl/ArdCameraNoGuideZoneServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/device/noguidezone/service/impl/ArdCameraNoGuideZoneServiceImpl.java
@@ -17,7 +17,7 @@
* 绂佸紩鍙鍩烻ervice涓氬姟灞傚鐞�
*
* @author ard
- * @date 2023-10-27
+ * @date 2023-10-28
*/
@Service
public class ArdCameraNoGuideZoneServiceImpl implements IArdCameraNoGuideZoneService {
@@ -27,12 +27,12 @@
/**
* 鏌ヨ绂佸紩鍙鍩�
*
- * @param name 绂佸紩鍙鍩熶富閿�
+ * @param id 绂佸紩鍙鍩熶富閿�
* @return 绂佸紩鍙鍩�
*/
@Override
- public ArdCameraNoGuideZone selectArdCameraNoGuideZoneByName(String name) {
- return ardCameraNoGuideZoneMapper.selectArdCameraNoGuideZoneByName(name);
+ public ArdCameraNoGuideZone selectArdCameraNoGuideZoneById(String id) {
+ return ardCameraNoGuideZoneMapper.selectArdCameraNoGuideZoneById(id);
}
/**
@@ -54,10 +54,10 @@
*/
@Override
public int insertArdCameraNoGuideZone(ArdCameraNoGuideZone ardCameraNoGuideZone) {
+ ardCameraNoGuideZone.setId(IdUtils.simpleUUID());
ardCameraNoGuideZone.setUserId(SecurityUtils.getUserId());
ardCameraNoGuideZone.setCreateBy(SecurityUtils.getUsername());
ardCameraNoGuideZone.setCreateTime(DateUtils.getNowDate());
- ardCameraNoGuideZone.setId(IdUtils.simpleUUID());
return ardCameraNoGuideZoneMapper.insertArdCameraNoGuideZone(ardCameraNoGuideZone);
}
@@ -77,22 +77,22 @@
/**
* 鎵归噺鍒犻櫎绂佸紩鍙鍩�
*
- * @param names 闇�瑕佸垹闄ょ殑绂佸紩鍙鍩熶富閿�
+ * @param ids 闇�瑕佸垹闄ょ殑绂佸紩鍙鍩熶富閿�
* @return 缁撴灉
*/
@Override
- public int deleteArdCameraNoGuideZoneByNames(String[] names) {
- return ardCameraNoGuideZoneMapper.deleteArdCameraNoGuideZoneByNames(names);
+ public int deleteArdCameraNoGuideZoneByIds(String[] ids) {
+ return ardCameraNoGuideZoneMapper.deleteArdCameraNoGuideZoneByIds(ids);
}
/**
* 鍒犻櫎绂佸紩鍙鍩熶俊鎭�
*
- * @param name 绂佸紩鍙鍩熶富閿�
+ * @param id 绂佸紩鍙鍩熶富閿�
* @return 缁撴灉
*/
@Override
- public int deleteArdCameraNoGuideZoneByName(String name) {
- return ardCameraNoGuideZoneMapper.deleteArdCameraNoGuideZoneByName(name);
+ public int deleteArdCameraNoGuideZoneById(String id) {
+ return ardCameraNoGuideZoneMapper.deleteArdCameraNoGuideZoneById(id);
}
}
diff --git a/ard-work/src/main/resources/mapper/device/ArdCameraNoGuideZoneMapper.xml b/ard-work/src/main/resources/mapper/device/ArdCameraNoGuideZoneMapper.xml
index 84718c3..b830bdc 100644
--- a/ard-work/src/main/resources/mapper/device/ArdCameraNoGuideZoneMapper.xml
+++ b/ard-work/src/main/resources/mapper/device/ArdCameraNoGuideZoneMapper.xml
@@ -5,6 +5,7 @@
<mapper namespace="com.ruoyi.device.noguidezone.mapper.ArdCameraNoGuideZoneMapper">
<resultMap type="ArdCameraNoGuideZone" id="ArdCameraNoGuideZoneResult">
+ <result property="id" column="id" />
<result property="name" column="name" />
<result property="poi" column="poi" />
<result property="cameraId" column="camera_id" />
@@ -15,11 +16,10 @@
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
- <result property="id" column="id" />
</resultMap>
<sql id="selectArdCameraNoGuideZoneVo">
- select name, poi, camera_id, enabled, dept_id, user_id, create_by, create_time, update_by, update_time, id from ard_camera_no_guide_zone
+ select id, name, poi, camera_id, enabled, dept_id, user_id, create_by, create_time, update_by, update_time from ard_camera_no_guide_zone
</sql>
<select id="selectArdCameraNoGuideZoneList" parameterType="ArdCameraNoGuideZone" resultMap="ArdCameraNoGuideZoneResult">
@@ -29,19 +29,20 @@
<if test="poi != null and poi != ''"> and poi = #{poi}</if>
<if test="cameraId != null and cameraId != ''"> and camera_id = #{cameraId}</if>
<if test="enabled != null and enabled != ''"> and enabled = #{enabled}</if>
- <if test="deptId != null "> and dept_id = #{deptId}</if>
+ <if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
</where>
</select>
- <select id="selectArdCameraNoGuideZoneByName" parameterType="String" resultMap="ArdCameraNoGuideZoneResult">
+ <select id="selectArdCameraNoGuideZoneById" parameterType="String" resultMap="ArdCameraNoGuideZoneResult">
<include refid="selectArdCameraNoGuideZoneVo"/>
- where name = #{name}
+ where id = #{id}
</select>
<insert id="insertArdCameraNoGuideZone" parameterType="ArdCameraNoGuideZone">
insert into ard_camera_no_guide_zone
<trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">id,</if>
<if test="name != null">name,</if>
<if test="poi != null">poi,</if>
<if test="cameraId != null">camera_id,</if>
@@ -52,9 +53,9 @@
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
- <if test="id != null">id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">#{id},</if>
<if test="name != null">#{name},</if>
<if test="poi != null">#{poi},</if>
<if test="cameraId != null">#{cameraId},</if>
@@ -65,13 +66,13 @@
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
- <if test="id != null">#{id},</if>
</trim>
</insert>
<update id="updateArdCameraNoGuideZone" parameterType="ArdCameraNoGuideZone">
update ard_camera_no_guide_zone
<trim prefix="SET" suffixOverrides=",">
+ <if test="name != null">name = #{name},</if>
<if test="poi != null">poi = #{poi},</if>
<if test="cameraId != null">camera_id = #{cameraId},</if>
<if test="enabled != null">enabled = #{enabled},</if>
@@ -81,19 +82,18 @@
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="id != null">id = #{id},</if>
</trim>
- where name = #{name}
+ where id = #{id}
</update>
- <delete id="deleteArdCameraNoGuideZoneByName" parameterType="String">
- delete from ard_camera_no_guide_zone where name = #{name}
+ <delete id="deleteArdCameraNoGuideZoneById" parameterType="String">
+ delete from ard_camera_no_guide_zone where id = #{id}
</delete>
- <delete id="deleteArdCameraNoGuideZoneByNames" parameterType="String">
- delete from ard_camera_no_guide_zone where name in
- <foreach item="name" collection="array" open="(" separator="," close=")">
- #{name}
+ <delete id="deleteArdCameraNoGuideZoneByIds" parameterType="String">
+ delete from ard_camera_no_guide_zone where id in
+ <foreach item="id" collection="array" open="(" separator="," close=")">
+ #{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3