| | |
| | | |
| | | 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; |
| | |
| | | } |
| | | |
| | | @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(); |
| | |
| | | |
| | | |
| | | @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)); |