package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.dto.DroneMissionsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DroneMissionsMapper;
import com.ruoyi.system.domain.DroneMissions;
import com.ruoyi.system.service.IDroneMissionsService;

/**
 * 无人机任务Service业务层处理
 *
 * @author ruoyi
 * @date 2024-07-24
 */
@Service
public class DroneMissionsServiceImpl implements IDroneMissionsService
{
    @Autowired
    private DroneMissionsMapper droneMissionsMapper;

    /**
     * 查询无人机任务
     *
     * @param id 无人机任务主键
     * @return 无人机任务
     */
    @Override
    public DroneMissions selectDroneMissionsById(Long id)
    {
        return droneMissionsMapper.selectDroneMissionsById(id);
    }

    /**
     * 查询无人机任务列表
     *
     * @param droneMissions 无人机任务
     * @return 无人机任务
     */
    @Override
    public List<DroneMissions> selectDroneMissionsList(DroneMissions droneMissions)
    {
        return droneMissionsMapper.selectDroneMissionsList(droneMissions);
    }

    /**
     * 新增无人机任务
     *
     * @param droneMissions 无人机任务
     * @return 结果
     */
    @Override
    public int insertDroneMissions(DroneMissions droneMissions)
    {
        return droneMissionsMapper.insertDroneMissions(droneMissions);
    }

    /**
     * 修改无人机任务
     *
     * @param droneMissions 无人机任务
     * @return 结果
     */
    @Override
    public int updateDroneMissions(DroneMissions droneMissions)
    {
        return droneMissionsMapper.updateDroneMissions(droneMissions);
    }

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


    @Override
    public List<DroneMissionsVo> selectDroneMissionsVoList(DroneMissions droneMissions) {
        return droneMissionsMapper.selectDroneMissionsVoList(droneMissions);
    }

    @Override
    public DroneMissions selectDroneMissionsByCondition(String flightId) {
        return droneMissionsMapper.selectDroneMissionsByCondition(flightId);
    }

    /**
     * 删除无人机任务信息
     *
     * @param id 无人机任务主键
     * @return 结果
     */
    @Override
    public int deleteDroneMissionsById(Long id)
    {
        return droneMissionsMapper.deleteDroneMissionsById(id);
    }
}
