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.ParkInspectProjMapper;
import com.huashe.park.core.service.IParkInspectProjService;
import com.huashe.park.domain.entity.ParkInspectProj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 巡检项Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-06
 */
@Service
@DataSource(DataSourceType.PKB)
public class ParkInspectProjServiceImpl implements IParkInspectProjService
{
    @Autowired
    private ParkInspectProjMapper parkInspectProjMapper;

    /**
     * 查询巡检项
     * 
     * @param id 巡检项主键
     * @return 巡检项
     */
    @Override
    public ParkInspectProj selectParkInspectProjById(Long id)
    {
        return parkInspectProjMapper.selectParkInspectProjById(id);
    }

    /**
     * 查询巡检项列表
     * 
     * @param parkInspectProj 巡检项
     * @return 巡检项
     */
    @Override
    public List<ParkInspectProj> selectParkInspectProjList(ParkInspectProj parkInspectProj)
    {
        return parkInspectProjMapper.selectParkInspectProjList(parkInspectProj);
    }

    /**
     * 新增巡检项
     * 
     * @param parkInspectProj 巡检项
     * @return 结果
     */
    @Override
    public int insertParkInspectProj(ParkInspectProj parkInspectProj)
    {
        return parkInspectProjMapper.insertParkInspectProj(parkInspectProj);
    }

    /**
     * 修改巡检项
     * 
     * @param parkInspectProj 巡检项
     * @return 结果
     */
    @Override
    public int updateParkInspectProj(ParkInspectProj parkInspectProj)
    {
        return parkInspectProjMapper.updateParkInspectProj(parkInspectProj);
    }

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

    /**
     * 删除巡检项信息
     * 
     * @param id 巡检项主键
     * @return 结果
     */
    @Override
    public int deleteParkInspectProjById(Long id)
    {
        return parkInspectProjMapper.deleteParkInspectProjById(id);
    }
}
