package com.tuoheng.admin.controller;

import com.tuoheng.admin.service.airportline.IAirportLineService;
import com.tuoheng.common.core.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 航线前端控制器
 *
 * @Author ChengWang
 * @Date 2023/3/2
 */
@RestController
@RequestMapping("/airportLine")
public class AirportLineController {

    @Autowired
    private IAirportLineService airportLineService;

    @GetMapping("/info/byAccidentId/{accidentId}")
    public JsonResult getInfoByAccidentId(@PathVariable("accidentId") String accidentId) {
        return airportLineService.getInfoByAccidentId(accidentId);
    }

    @GetMapping("/info/byInspectionId/{inspectionId}")
    public JsonResult getInfoByInspectionId(@PathVariable("inspectionId") String inspectionId) {
        return airportLineService.getInfoByInspectionId(inspectionId);
    }
}
