From a0eae3ecda7b70468c60a0079db6c4609c29939d Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 17 四月 2025 09:36:22 +0800
Subject: [PATCH] Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/JiaDianHuiShou

---
 ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/OrderController.java |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/OrderController.java b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/OrderController.java
index 8b75f97..3583d1e 100644
--- a/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/OrderController.java
+++ b/ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/OrderController.java
@@ -535,7 +535,7 @@
 //
 //    }
 
-    @ApiOperation(value = "上传经纬度", tags = {"师傅端-首页"})
+    @ApiOperation(value = "上传经纬度", tags = {"师傅端-首页[2.0]"})
     @GetMapping(value = "/putLocation")
     @ApiImplicitParams({
             @ApiImplicitParam(value = "workId", name = "workId", dataType = "int", required = true),
@@ -545,10 +545,14 @@
     public R<Object> orderNavigation(@RequestParam Integer workId, @RequestParam String longitude,
                                      @RequestParam String latitude) {
         Result<String> address = GaoDeMapUtil.getCityCode(longitude, latitude);
-        System.err.println(address.getDatas());
+        String cityCode = address.getDatas();
+        System.err.println("城市code"+cityCode);
+        String provinceCode = cityCode.substring(0, 2) + "0000";
+        System.err.println("省份code"+provinceCode);
         Set<Integer> strings = new HashSet<>();
         strings.add(workId);
-        redisService.setCacheSet("workerLocation:"+address.getDatas()+":", strings);
+        redisService.setCacheSet("workerLocation:"+cityCode+":", strings);
+        redisService.setCacheSet("workerLocation:"+provinceCode+":", strings);
         redisService.setCacheObject("work:"+workId+":", longitude+","+latitude);
         return R.ok();
 

--
Gitblit v1.7.1