| | |
| | | |
| | | 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; |
| | | import com.dsh.other.feignclient.model.*; |
| | | import com.dsh.other.model.BaseVo; |
| | | import com.dsh.other.model.QueryStoreList; |
| | | import com.dsh.other.service.StoreService; |
| | | import com.dsh.other.util.GDMapGeocodingUtil; |
| | | import com.dsh.other.util.ResultUtil; |
| | | import com.dsh.other.util.ToolUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | return storeInfos; |
| | | } |
| | | |
| | | /** |
| | | * 根据门店坐标与传入坐标,计算距离 |
| | | * @param distanceVo |
| | | * @return |
| | | */ |
| | | @PostMapping("/base/protocol/storeDetail/distanceCal") |
| | | public long calculateDistance(@RequestBody GetDistanceVo distanceVo){ |
| | | String current = distanceVo.getLongitude()+","+distanceVo.getLatitude(); |
| | | Store store = storeService.getById(distanceVo.getStoreId()); |
| | | String result = store.getLon()+","+store.getLat(); |
| | | String distanceTOKilometer = gdMapGeocodingUtil.getDistanceTOKilometer(current, result); |
| | | return Long.parseLong(distanceTOKilometer); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/base/protocol/storeDetail/storeOfLonLat") |
| | | public List<StoreLonLatList> getAllStoreLonLats(@RequestBody GetAllNearbyStoreList list ){ |