package com.inspect.metadata.threshold.service.impl;

import com.inspect.metadata.threshold.domain.BasedataThresholdModification;
import com.inspect.metadata.threshold.mapper.BasedataThresholdModificationMapper;
import com.inspect.metadata.threshold.service.IBasedataThresholdModificationService;
import com.inspect.base.core.utils.DateUtils;

import java.util.List;

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

import javax.annotation.Resource;

@Service
public class BasedataThresholdModificationServiceImpl implements IBasedataThresholdModificationService {
    @Resource
    private BasedataThresholdModificationMapper basedataThresholdModificationMapper;

    public BasedataThresholdModification selectBasedataThresholdModificationByLineId(Long lineId) {
        return this.basedataThresholdModificationMapper.selectBasedataThresholdModificationByLineId(lineId);
    }

    public List<BasedataThresholdModification> selectBasedataThresholdModificationList(BasedataThresholdModification basedataThresholdModification) {
        return this.basedataThresholdModificationMapper.selectBasedataThresholdModificationList(basedataThresholdModification);
    }

    public int insertBasedataThresholdModification(BasedataThresholdModification basedataThresholdModification) {
        basedataThresholdModification.setCreateTime(DateUtils.getNowDate());
        return this.basedataThresholdModificationMapper.insertBasedataThresholdModification(basedataThresholdModification);
    }

    public int updateBasedataThresholdModification(BasedataThresholdModification basedataThresholdModification) {
        basedataThresholdModification.setUpdateTime(DateUtils.getNowDate());
        return this.basedataThresholdModificationMapper.updateBasedataThresholdModification(basedataThresholdModification);
    }

    public int deleteBasedataThresholdModificationByLineIds(Long[] lineIds) {
        return this.basedataThresholdModificationMapper.deleteBasedataThresholdModificationByLineIds(lineIds);
    }

    public int deleteBasedataThresholdModificationByLineId(Long lineId) {
        return this.basedataThresholdModificationMapper.deleteBasedataThresholdModificationByLineId(lineId);
    }
}
