package com.huashe.park.core.service.impl;

import java.util.List;

import com.huashe.common.annotation.DataSource;
import com.huashe.common.enums.DataSourceType;
import com.huashe.park.core.mapper.ParkInspectTaskMapper;
import com.huashe.park.core.service.IParkInspectTaskService;
import com.huashe.park.domain.entity.ParkInspectTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 巡检任务Service业务层处理
 *
 * @author ruoyi
 * @date 2025-01-07
 */
@Service
@DataSource(DataSourceType.PKB)
public class ParkInspectTaskServiceImpl implements IParkInspectTaskService {
    @Autowired
    private ParkInspectTaskMapper parkInspectTaskMapper;

    /**
     * 查询巡检任务
     *
     * @param id 巡检任务主键
     * @return 巡检任务
     */
    @Override
    public ParkInspectTask selectParkInspectTaskById(Long id) {
        return parkInspectTaskMapper.selectParkInspectTaskById(id);
    }

    /**
     * 查询巡检任务列表
     *
     * @param parkInspectTask 巡检任务
     * @return 巡检任务
     */
    @Override
    public List<ParkInspectTask> selectParkInspectTaskList(ParkInspectTask parkInspectTask) {
        return parkInspectTaskMapper.selectParkInspectTaskList(parkInspectTask);
    }

    /**
     * 新增巡检任务
     *
     * @param parkInspectTask 巡检任务
     * @return 结果
     */
    @Override
    public int insertParkInspectTask(ParkInspectTask parkInspectTask) {
        return parkInspectTaskMapper.insertParkInspectTask(parkInspectTask);
    }

    /**
     * 修改巡检任务
     *
     * @param parkInspectTask 巡检任务
     * @return 结果
     */
    @Override
    public int updateParkInspectTask(ParkInspectTask parkInspectTask) {
        return parkInspectTaskMapper.updateParkInspectTask(parkInspectTask);
    }

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

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