package com.uavps.system.service.impl;

import java.util.List;
import com.uavps.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.uavps.system.mapper.UavpsTaskMapper;
import com.uavps.system.domain.UavpsTask;
import com.uavps.system.service.IUavpsTaskService;

/**
 * 任务数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-17
 */
@Service
public class UavpsTaskServiceImpl implements IUavpsTaskService 
{
    @Autowired
    private UavpsTaskMapper uavpsTaskMapper;

    /**
     * 查询任务数据
     * 
     * @param bizId 任务数据主键
     * @return 任务数据
     */
    @Override
    public UavpsTask selectUavpsTaskByBizId(Long bizId)
    {
        return uavpsTaskMapper.selectUavpsTaskByBizId(bizId);
    }

    /**
     * 查询任务数据列表
     * 
     * @param uavpsTask 任务数据
     * @return 任务数据
     */
    @Override
    public List<UavpsTask> selectUavpsTaskList(UavpsTask uavpsTask)
    {
        return uavpsTaskMapper.selectUavpsTaskList(uavpsTask);
    }

    /**
     * 新增任务数据
     * 
     * @param uavpsTask 任务数据
     * @return 结果
     */
    @Override
    public int insertUavpsTask(UavpsTask uavpsTask)
    {
        uavpsTask.setCreateTime(DateUtils.getNowDate());
        return uavpsTaskMapper.insertUavpsTask(uavpsTask);
    }

    /**
     * 修改任务数据
     * 
     * @param uavpsTask 任务数据
     * @return 结果
     */
    @Override
    public int updateUavpsTask(UavpsTask uavpsTask)
    {
        uavpsTask.setUpdateTime(DateUtils.getNowDate());
        return uavpsTaskMapper.updateUavpsTask(uavpsTask);
    }

    /**
     * 批量删除任务数据
     * 
     * @param bizIds 需要删除的任务数据主键
     * @return 结果
     */
    @Override
    public int deleteUavpsTaskByBizIds(Long[] bizIds)
    {
        return uavpsTaskMapper.deleteUavpsTaskByBizIds(bizIds);
    }

    /**
     * 删除任务数据信息
     * 
     * @param bizId 任务数据主键
     * @return 结果
     */
    @Override
    public int deleteUavpsTaskByBizId(Long bizId)
    {
        return uavpsTaskMapper.deleteUavpsTaskByBizId(bizId);
    }
}
