package com.base.track.controller;

import com.base.orbit.web.Result;
import com.base.track.model.dto.request.QueryEphListDTO;
import com.base.track.model.dto.request.SubPointRequestDTO;
import com.base.track.service.SubPointDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags = "星下点", description = "星下点基础查询")
@RestController

@RequestMapping("/api/subpoint")
public class SubPointDataController {

    @Resource
    SubPointDataService subPointDataService;


    @ApiOperation(value = "根据时间查询星下点")
    @GetMapping("/list/getSingleSatelliteSubPointDataList")
    public Object getSingleSatelliteSubPointDataList( QueryEphListDTO queryEphListDTO) {
        return Result.success(subPointDataService.getSingleSatelliteSubPointDataList(queryEphListDTO.getCode(),queryEphListDTO.getStartTime(),queryEphListDTO.getEndTime()));
    }

    @ApiOperation(value = "查询星下点")
    @PostMapping("/list")
    public Object list(@RequestBody SubPointRequestDTO subPointRequestDTO) {
        return Result.success(subPointDataService.listsub(subPointRequestDTO));
    }

}
