From 2b4511ca363e74343e1cb678c23a9e7638800a3f Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期四, 06 七月 2023 17:33:25 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- 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 96e7621..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(@RequestParam("longitude") String longitude, @RequestParam("latitude") 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(@RequestParam("longitude") String longitude, @RequestParam("latitude") 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