Commit 90252bd2 authored by tangwei's avatar tangwei

对接航班号

parent 5560ae62
...@@ -4,7 +4,10 @@ import org.springframework.cloud.openfeign.FeignClient; ...@@ -4,7 +4,10 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -21,8 +24,9 @@ public interface IotFeignClient { ...@@ -21,8 +24,9 @@ public interface IotFeignClient {
**/ **/
@RequestMapping(value = "/v1/iot/DynamicFlightInfo/{flightNo}", method = RequestMethod.GET) @RequestMapping(value = "/v1/iot/DynamicFlightInfo/{flightNo}", method = RequestMethod.GET)
ResponseModel<Map<String, Object>> getDynamicFlightInfo(@PathVariable String flightNo); ResponseModel<Map<String, Object>> getDynamicFlightInfo(@PathVariable String flightNo);
@RequestMapping(value = "/v1/iot/DynamicFlightInfo/list", method = RequestMethod.GET)
ResponseModel<List<Map<String, Object>>> findImgByFileCategory();
} }
...@@ -161,14 +161,9 @@ public class AircraftController extends BaseController { ...@@ -161,14 +161,9 @@ public class AircraftController extends BaseController {
@GetMapping(value = "/getAircraftNum") @GetMapping(value = "/getAircraftNum")
@ApiOperation(httpMethod = "GET", value = "获取24小时内的航班号", notes = "获取24小时内的航班号") @ApiOperation(httpMethod = "GET", value = "获取24小时内的航班号", notes = "获取24小时内的航班号")
public ResponseModel<List<Map<String, Object>>> getAircraftNum() { public ResponseModel<List<Map<String, Object>>> getAircraftNum() {
List<Map<String, Object>> list= new ArrayList<>(); List<Map<String, Object>> list= new ArrayList<>();
Map<String, Object> map=new HashedMap(); ResponseModel<List<Map<String, Object>>> dataModel= iotFeignClient.findImgByFileCategory();
Map<String, Object> map1=new HashedMap(); return ResponseHelper.buildResponse(dataModel!=null?dataModel.getResult():null);
map.put("id", "1");map.put("name", "测试");
map1.put("id", "12");map1.put("name", "测试2");
list.add(map1);
list.add(map);
return ResponseHelper.buildResponse(list);
} }
/** /**
...@@ -181,9 +176,7 @@ public class AircraftController extends BaseController { ...@@ -181,9 +176,7 @@ public class AircraftController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "通过航班号,查询最新的航班信息", notes = "通过航班号,查询最新的航班信息") @ApiOperation(httpMethod = "GET", value = "通过航班号,查询最新的航班信息", notes = "通过航班号,查询最新的航班信息")
public ResponseModel<Map<String, Object>> getAircraftDetails(@PathVariable String num) { public ResponseModel<Map<String, Object>> getAircraftDetails(@PathVariable String num) {
Map<String, Object> map1=new HashedMap(); Map<String, Object> map1=new HashedMap();
ResponseModel<Map<String, Object>> dataModel= iotFeignClient.getDynamicFlightInfo(num); ResponseModel<Map<String, Object>> dataModel= iotFeignClient.getDynamicFlightInfo(num);
if(dataModel!=null) { if(dataModel!=null) {
Map<String, Object> map= dataModel.getResult(); Map<String, Object> map= dataModel.getResult();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment