package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;

import com.ruoyi.system.dto.FlightTasksVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FlightTasksMapper;
import com.ruoyi.system.domain.FlightTasks;
import com.ruoyi.system.service.IFlightTasksService;

/**
 * 任务Service业务层处理
 *
 * @author ruoyi
 * @date 2024-07-24
 */
@Service
public class FlightTasksServiceImpl implements IFlightTasksService {
    @Autowired
    private FlightTasksMapper flightTasksMapper;

    /**
     * 查询任务
     *
     * @param id 任务主键
     * @return 任务
     */
    @Override
    public FlightTasks selectFlightTasksById(Long id) {
        return flightTasksMapper.selectFlightTasksById(id);
    }

    /**
     * 查询任务列表
     *
     * @param flightTasks 任务
     * @return 任务
     */
    @Override
    public List<FlightTasks> selectFlightTasksList(FlightTasks flightTasks) {
        return flightTasksMapper.selectFlightTasksList(flightTasks);
    }

    /**
     * 新增任务
     *
     * @param flightTasks 任务
     * @return 结果
     */
    @Override
    public int insertFlightTasks(FlightTasks flightTasks) {
        return flightTasksMapper.insertFlightTasks(flightTasks);
    }

    /**
     * 修改任务
     *
     * @param flightTasks 任务
     * @return 结果
     */
    @Override
    public int updateFlightTasks(FlightTasks flightTasks) {
        return flightTasksMapper.updateFlightTasks(flightTasks);
    }

    /**
     * 批量删除任务
     *
     * @param ids 需要删除的任务主键
     * @return 结果
     */
    @Override
    public int deleteFlightTasksByIds(Long[] ids) {
        return flightTasksMapper.deleteFlightTasksByIds(ids);
    }


    @Override
    public void updateFlightTasksStatus(String flightId, String status, Date updateTime) {
        flightTasksMapper.updateFlightTasksStatus(flightId, status, updateTime);
    }

    @Override
    public List<FlightTasksVo> selectFlightTasksVoList(FlightTasks flightTasks) {
        return flightTasksMapper.selectFlightTasksVoList(flightTasks);
    }

    /**
     * 删除任务信息
     *
     * @param id 任务主键
     * @return 结果
     */
    @Override
    public int deleteFlightTasksById(Long id) {
        return flightTasksMapper.deleteFlightTasksById(id);
    }
}
