| | |
| | | package com.stylefeng.guns.modular.transfer.controller; |
| | | |
| | | |
| | | import com.aliyuncs.utils.StringUtils; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.dao.TOpenCitySiteMapper; |
| | | import com.stylefeng.guns.modular.system.model.OpenCity; |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil site(double latitude, double longitude) throws Exception { |
| | | public ResultUtil site(double latitude, double longitude,String code) throws Exception { |
| | | //获取当前城市名称 |
| | | String cityName = AmapGeocoding.getCityName(latitude, longitude); |
| | | |
| | | Wrapper<OpenCity> ne = new EntityWrapper<OpenCity>().eq("cityName", cityName).ne("flag", 3); |
| | | if (!StringUtils.isEmpty(code)){ |
| | | ne.eq("code",code); |
| | | } |
| | | //查询ids |
| | | List<OpenCity> cityName1 = openCityService.selectList(new EntityWrapper<OpenCity>().eq("cityName", cityName).ne("flag",3)); |
| | | List<OpenCity> cityName1 = openCityService.selectList(ne); |
| | | List<Integer> ids = new ArrayList<>(); |
| | | for (OpenCity openCity : cityName1) { |
| | | ids.add(openCity.getId()); |
| | |
| | | List<TOpenCitySite> dongche = new ArrayList<>(); |
| | | |
| | | for (TOpenCitySite tOpenCitySite : tOpenCitySites) { |
| | | |
| | | String address = AmapGeocoding.getAddress(latitude, longitude); |
| | | tOpenCitySite.setAddress(address); |
| | | if (tOpenCitySite.getType()==1){ |
| | | jichang.add(tOpenCitySite); |
| | | } |