package com.tuoheng.admin.controller;

import com.tuoheng.admin.service.index.IndexService;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
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/16
 */
@RestController
@RequestMapping("/index")
@Slf4j
public class IndexGisController {

    @Autowired
    private IndexService indexService;

    /**
     * 获取机场详细信息
     * @param airportId
     * @return
     */
    @GetMapping("/getAirportMsg/{airportId}")
    public JsonResult getAirportMsg(@PathVariable("airportId") Integer airportId){
        log.info("根据机场id获取机场详细信息,airportId={}",airportId.toString());
        return indexService.getAirportMsg(airportId);
    }


}
