From 810126cbd136a1ba57a6740fb10785020698c607 Mon Sep 17 00:00:00 2001 From: attiya <2413103649@qq.com> Date: Thu, 8 May 2025 14:50:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=99=E7=82=B9GEO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cdzy/orders/uitls/RedisUtil.java | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/ebike-orders/src/main/java/com/cdzy/orders/uitls/RedisUtil.java b/ebike-orders/src/main/java/com/cdzy/orders/uitls/RedisUtil.java index 57acbdaf..51c99b56 100644 --- a/ebike-orders/src/main/java/com/cdzy/orders/uitls/RedisUtil.java +++ b/ebike-orders/src/main/java/com/cdzy/orders/uitls/RedisUtil.java @@ -357,12 +357,33 @@ public class RedisUtil { } /** - * 删除指定停车区的元数据(MBR 和顶点) - * @param orgId 组织ID + * 删除运营区 + * */ - public void deleteParkingAreaMeta(Long orgId,Long regionId) { - String hashKey = "parking_area:meta:" + orgId; - redisTemplate.opsForHash().delete(hashKey,"vertices"+regionId,"mbr"+regionId); + public void delOperationArea(Long orgId,Long regionId) { + redisTemplate.opsForGeo().remove(operationKey+orgId,regionId); + delOperationAreaMeta(orgId,regionId); + } + + public void delOperationAreaMeta(Long orgId,Long regionId) { + redisTemplate.opsForHash().delete("operation_area:meta:" + orgId, "vertices"+regionId); + redisTemplate.opsForHash().delete("operation_area:meta:" + orgId, "mbr"+regionId); + } + + + /** + * 删除停车区数据 + * @param areaId 运营区Id + * @param regionId 停车区Id + */ + public void delParkingArea(Long areaId,Long regionId) { + redisTemplate.opsForGeo().remove(parkingKey+areaId, regionId); + delParkingAreaMeta(areaId,regionId); + } + + public void delParkingAreaMeta(Long areaId,Long regionId) { + redisTemplate.opsForHash().delete("parking_area:meta:" + areaId, "vertices"+regionId); + redisTemplate.opsForHash().delete("parking_area:meta:" + areaId, "mbr"+regionId); } /**