package com.inspect.patrol.service.impl;

import com.inspect.base.core.utils.DateUtils;
import com.inspect.patrol.domain.PatrolPosInfrared;
import com.inspect.patrol.mapper.PatrolPosInfraredMapper;
import com.inspect.patrol.service.IPatrolPosInfraredService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PatrolPosInfraredServiceImpl implements IPatrolPosInfraredService {
    private final PatrolPosInfraredMapper patrolPosInfraredMapper;

    public PatrolPosInfraredServiceImpl(PatrolPosInfraredMapper patrolPosInfraredMapper) {
        this.patrolPosInfraredMapper = patrolPosInfraredMapper;
    }

    public PatrolPosInfrared selectPatrolPosInfraredByPatrolPosInfraredId(Long patrolPosInfraredId) {
        return this.patrolPosInfraredMapper.selectPatrolPosInfraredByPatrolPosInfraredId(patrolPosInfraredId);
    }

    public List<PatrolPosInfrared> selectPatrolPosInfraredList(PatrolPosInfrared patrolPosInfrared) {
        return this.patrolPosInfraredMapper.selectPatrolPosInfraredList(patrolPosInfrared);
    }

    public int insertPatrolPosInfrared(PatrolPosInfrared patrolPosInfrared) {
        patrolPosInfrared.setCreateTime(DateUtils.getNowDate());
        return this.patrolPosInfraredMapper.insertPatrolPosInfrared(patrolPosInfrared);
    }

    public int updatePatrolPosInfrared(PatrolPosInfrared patrolPosInfrared) {
        return this.patrolPosInfraredMapper.updatePatrolPosInfrared(patrolPosInfrared);
    }

    public int deletePatrolPosInfraredByPatrolPosInfraredIds(Long[] patrolPosInfraredIds) {
        return this.patrolPosInfraredMapper.deletePatrolPosInfraredByPatrolPosInfraredIds(patrolPosInfraredIds);
    }

    public int deletePatrolPosInfraredByPatrolPosInfraredId(Long patrolPosInfraredId) {
        return this.patrolPosInfraredMapper.deletePatrolPosInfraredByPatrolPosInfraredId(patrolPosInfraredId);
    }
}
