package com.base.biz.controller;

import com.base.biz.model.dto.InstanceInfoDTO;
import com.base.biz.model.dto.request.InstanceInfoDTOListReq;
import com.base.biz.service.InstanceService;
import com.base.orbit.web.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags ="轨道")
@RestController
@RequestMapping("/api/instance")
public class InstanceController {

    @Resource
    InstanceService instanceService;

    @ApiOperation(value = "根据卫星代号查询轨道六根数",response = InstanceInfoDTO.class)
    @GetMapping("/list")
    public Object getInstanceInfoDTOList(InstanceInfoDTOListReq req){
        return Result.success(instanceService.getInstanceInfoDTOList(req));
    }

}
