package com.inspect.partrolresultAux.service.impl;

import com.inspect.base.core.utils.DateUtils;
import com.inspect.partrolresultAux.domain.PatrolResultAux;
import com.inspect.partrolresultAux.mapper.PatrolResultAuxMapper;
import com.inspect.partrolresultAux.service.IPatrolResultAuxService;

import java.util.List;

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

@Service
public class PatrolResultAuxServiceImpl implements IPatrolResultAuxService {
    private final PatrolResultAuxMapper patrolResultAuxMapper;

    public PatrolResultAuxServiceImpl(PatrolResultAuxMapper patrolResultAuxMapper) {
        this.patrolResultAuxMapper = patrolResultAuxMapper;
    }

    public PatrolResultAux selectPatrolResultAuxByLineId(Long lineId) {
        return this.patrolResultAuxMapper.selectPatrolResultAuxByLineId(lineId);
    }

    public List<PatrolResultAux> selectPatrolResultAuxList(PatrolResultAux patrolResultAux) {
        return this.patrolResultAuxMapper.selectPatrolResultAuxList(patrolResultAux);
    }

    public List<PatrolResultAux> selectPatrolResultAuxListByMainId(PatrolResultAux patrolResultAux) {
        return this.patrolResultAuxMapper.selectPatrolResultAuxListByMainId(patrolResultAux);
    }

    @Override
    public List<PatrolResultAux> selectPatrolResultAuxListByMainIds(List<Long> mainIds) {
        return this.patrolResultAuxMapper.selectPatrolResultAuxListByMainIds(mainIds);
    }

    public int insertPatrolResultAux(PatrolResultAux patrolResultAux) {
        patrolResultAux.setCreateTime(DateUtils.getNowDate());
        return this.patrolResultAuxMapper.insertPatrolResultAux(patrolResultAux);
    }

    public int updatePatrolResultAux(PatrolResultAux patrolResultAux) {
        return this.patrolResultAuxMapper.updatePatrolResultAux(patrolResultAux);
    }

    public int deletePatrolResultAuxByLineIds(Long[] lineIds) {
        return this.patrolResultAuxMapper.deletePatrolResultAuxByLineIds(lineIds);
    }

    public int deletePatrolResultAuxByLineId(Long lineId) {
        return this.patrolResultAuxMapper.deletePatrolResultAuxByLineId(lineId);
    }
}
