package com.tuoheng.admin.service.third.airport;

import cn.hutool.core.util.ObjectUtil;
import com.tuoheng.admin.tzhl.response.TZHLAirportMsgResponse;
import com.tuoheng.admin.tzhl.service.airport.TZHLGetAirportMsgService;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author xiaoying
 * @Date 2023/4/14 16:05
 */
@Service
@Slf4j
public class GetAirportDetailService {

    @Autowired
    private TZHLGetAirportMsgService tzhlGetAirportMsgService;

    public JsonResult getAirportDetail(String sn) {

        TZHLAirportMsgResponse airportMsgResponse = tzhlGetAirportMsgService.getAirportMsg(sn);
        if(ObjectUtil.isNull(airportMsgResponse)){
            return JsonResult.error("获取机场信息失败");
        }


        return JsonResult.success(airportMsgResponse);
    }
}
