|
|
@@ -14,6 +14,8 @@ import com.tuoheng.common.core.utils.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
import java.net.URLEncoder; |
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
@Service |
|
|
@@ -34,9 +36,13 @@ public class AirportServiceImpl implements AirportService { |
|
|
|
if (StringUtils.isEmpty(tenant.getAirportUrl())) { |
|
|
|
return JsonResult.error(AriportCodeEnum.GET_NO_TENANT.getCode(), AriportCodeEnum.GET_NO_TENANT.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
String url = tenant.getAirportUrl() + SystemConstant.API_AIRPORT_LIST; |
|
|
|
String param = "page=1&limit=10"; |
|
|
|
String param; |
|
|
|
try { |
|
|
|
param = "page=1&limit=1000&tenantName=" + URLEncoder.encode(tenant.getName(), "UTF-8"); |
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
throw new RuntimeException(e); |
|
|
|
} |
|
|
|
String airPortStr = HttpUtils.sendGet(url, param); |
|
|
|
|
|
|
|
JsonResult jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); |