From 942bd1345a126d6c088ad5c89f58856f9c172ce5 Mon Sep 17 00:00:00 2001
From: lisy <linlangsur163@163.com>
Date: 星期五, 07 七月 2023 14:03:36 +0800
Subject: [PATCH] 去除请求参数的注解

---
 cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java
index 3ab7122..5058bd9 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/controller/StoreController.java
@@ -3,6 +3,7 @@
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.dsh.other.entity.Store;
+import com.dsh.other.feignclient.model.GetAllNearbyStoreList;
 import com.dsh.other.feignclient.model.StoreDetailOfCourse;
 import com.dsh.other.feignclient.model.StoreInfo;
 import com.dsh.other.feignclient.model.StoreLonLatList;
@@ -45,12 +46,12 @@
     }
 
     @PostMapping("/base/protocol/storeDetail/nearbyStore")
-    public List<StoreInfo> getAllNearbyStoreList(@RequestBody String longitude,@RequestBody String latitude){
-        String current = longitude+","+latitude;
+    public List<StoreInfo> getAllNearbyStoreList(@RequestBody GetAllNearbyStoreList list ){
+        String current = list.getLongitude()+","+list.getLatitude();
         List<StoreInfo> storeInfos = new ArrayList<>();
         String cityCode = "";
         try {
-            Map<String, String> geocode = gdMapGeocodingUtil.geocode(longitude, latitude);
+            Map<String, String> geocode = gdMapGeocodingUtil.geocode(list.getLongitude(), list.getLatitude());
             cityCode = geocode.get("cityCode");
         }catch (Exception e){
             e.printStackTrace();
@@ -85,10 +86,10 @@
 
 
     @PostMapping("/base/protocol/storeDetail/storeOfLonLat")
-    public List<StoreLonLatList> getAllStoreLonLats(@RequestBody String longitude, @RequestBody String latitude){
+    public List<StoreLonLatList> getAllStoreLonLats(@RequestBody GetAllNearbyStoreList list ){
         List<StoreLonLatList> storeInfos = new ArrayList<>();
         try {
-            Map<String, String> geocode = gdMapGeocodingUtil.geocode(longitude, latitude);
+            Map<String, String> geocode = gdMapGeocodingUtil.geocode(list.getLongitude(), list.getLatitude());
             String cityCode = geocode.get("cityCode");
             List<Store> storeList = storeService.list(new QueryWrapper<Store>()
                     .eq("cityCode",cityCode));

--
Gitblit v1.7.1