Browse Source

1、修改获取机场列表接口;2、修改获取路线列表接口

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
224d3231e4
2 changed files with 6 additions and 3 deletions
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirPortController.java
  2. +5
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airport/AirportServiceImpl.java

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirPortController.java View File

@@ -35,7 +35,7 @@ public class AirPortController {
* @param droneId 机场列表里面的droneId
* @return
*/
@GetMapping("/line/{droneId}")
@GetMapping("/line/list/{droneId}")
public JsonResult getAirLineList(@PathVariable("droneId") Integer droneId) {
return airportService.getAirLineList(droneId);
}

+ 5
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airport/AirportServiceImpl.java View File

@@ -18,6 +18,9 @@ import java.util.Objects;
@Service
public class AirportServiceImpl implements AirportService {

private final static String API_AIRPORT_LIST = "/api/airportInterface/airportList";
private final static String API_AIRPORT_LINE_LIST = "/api/airportInterface/taskByDroneId";

@Autowired
private TenantMapper tenantMapper;

@@ -34,7 +37,7 @@ public class AirportServiceImpl implements AirportService {
return JsonResult.error(AriportCodeEnum.GET_NO_TENANT.getCode(), AriportCodeEnum.GET_NO_TENANT.getMsg());
}

String url = tenant.getAirportUrl() + "/api/airportInterface/airportList";
String url = tenant.getAirportUrl() + API_AIRPORT_LIST;
String param = "page=1&limit=10";
String airPortStr = HttpUtils.sendGet(url, param);

@@ -57,7 +60,7 @@ public class AirportServiceImpl implements AirportService {
return JsonResult.error(AriportCodeEnum.GET_NO_TENANT.getCode(), AriportCodeEnum.GET_NO_TENANT.getMsg());
}

String url = tenant.getAirportUrl() + "/api/airportInterface/taskByDroneId";
String url = tenant.getAirportUrl() + API_AIRPORT_LINE_LIST;
String param = "page=1&limit=100&droneId=" + droneId;
String airPortStr = HttpUtils.sendGet(url, param);
JsonResult<AirLineVO> jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class);

Loading…
Cancel
Save