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

import com.huashe.common.annotation.DataSource;
import com.huashe.common.enums.DataSourceType;
import com.huashe.park.core.mapper.ParkInspectTaskUsrTrailMapper;
import com.huashe.park.core.service.IParkInspectTaskUsrTrailService;
import com.huashe.park.domain.entity.ParkInspectTaskUsrTrail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 巡检轨迹Service业务层处理
 *
 * @author ruoyi
 * @date 2025-01-07
 */
@Service
@DataSource(DataSourceType.PKB)
public class ParkInspectTaskUsrTrailServiceImpl implements IParkInspectTaskUsrTrailService {
    @Autowired
    private ParkInspectTaskUsrTrailMapper parkInspectTaskUsrTrailMapper;

    /**
     * 查询巡检轨迹
     *
     * @param id 巡检轨迹主键
     * @return 巡检轨迹
     */
    @Override
    public ParkInspectTaskUsrTrail selectParkInspectTaskUsrTrailById(Long id) {
        return parkInspectTaskUsrTrailMapper.selectParkInspectTaskUsrTrailById(id);
    }

    /**
     * 查询巡检轨迹列表
     *
     * @param parkInspectTaskUsrTrail 巡检轨迹
     * @return 巡检轨迹
     */
    @Override
    public List<ParkInspectTaskUsrTrail> selectParkInspectTaskUsrTrailList(ParkInspectTaskUsrTrail parkInspectTaskUsrTrail) {
        return parkInspectTaskUsrTrailMapper.selectParkInspectTaskUsrTrailList(parkInspectTaskUsrTrail);
    }

    /**
     * 新增巡检轨迹
     *
     * @param parkInspectTaskUsrTrail 巡检轨迹
     * @return 结果
     */
    @Override
    public int insertParkInspectTaskUsrTrail(ParkInspectTaskUsrTrail parkInspectTaskUsrTrail) {
        return parkInspectTaskUsrTrailMapper.insertParkInspectTaskUsrTrail(parkInspectTaskUsrTrail);
    }

    /**
     * 修改巡检轨迹
     *
     * @param parkInspectTaskUsrTrail 巡检轨迹
     * @return 结果
     */
    @Override
    public int updateParkInspectTaskUsrTrail(ParkInspectTaskUsrTrail parkInspectTaskUsrTrail) {
        return parkInspectTaskUsrTrailMapper.updateParkInspectTaskUsrTrail(parkInspectTaskUsrTrail);
    }

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

    /**
     * 删除巡检轨迹信息
     *
     * @param id 巡检轨迹主键
     * @return 结果
     */
    @Override
    public int deleteParkInspectTaskUsrTrailById(Long id) {
        return parkInspectTaskUsrTrailMapper.deleteParkInspectTaskUsrTrailById(id);
    }
}
