package com.inspect.alarmdefect.service.impl;

import com.inspect.alarmdefect.domain.AlarmDefect;
import com.inspect.alarmdefect.mapper.AlarmDefectMapper;
import com.inspect.alarmdefect.service.IAlarmDefectService;

import java.util.List;

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

@Service
public class AlarmDefectServiceImpl implements IAlarmDefectService {
    private final AlarmDefectMapper alarmDefectMapper;

    public AlarmDefectServiceImpl(AlarmDefectMapper alarmDefectMapper) {
        this.alarmDefectMapper = alarmDefectMapper;
    }

    public AlarmDefect selectAlarmDefectByLineId(Long lineId) {
        return this.alarmDefectMapper.selectAlarmDefectByLineId(lineId);
    }

    public List<AlarmDefect> selectAlarmDefectList(AlarmDefect alarmDefect) {
        return this.alarmDefectMapper.selectAlarmDefectList(alarmDefect);
    }

    public int insertAlarmDefect(AlarmDefect alarmDefect) {
        return this.alarmDefectMapper.insertAlarmDefect(alarmDefect);
    }

    public int updateAlarmDefect(AlarmDefect alarmDefect) {
        return this.alarmDefectMapper.updateAlarmDefect(alarmDefect);
    }

    public int deleteAlarmDefectByLineIds(Long[] lineIds) {
        return this.alarmDefectMapper.deleteAlarmDefectByLineIds(lineIds);
    }

    public int deleteAlarmDefectByLineId(Long lineId) {
        return this.alarmDefectMapper.deleteAlarmDefectByLineId(lineId);
    }
}
