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

import com.inspect.metadata.statis.domain.BasedataStatisNvr;
import com.inspect.metadata.statis.mapper.BasedataStatisNvrMapper;
import com.inspect.metadata.statis.service.IBasedataStatisNvrService;
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 BasedataStatisNvrServiceImpl implements IBasedataStatisNvrService {
    @Resource
    private BasedataStatisNvrMapper basedataStatisNvrMapper;

    public BasedataStatisNvr selectBasedataStatisNvrByStatisNvrId(Long statisNvrId) {
        return this.basedataStatisNvrMapper.selectBasedataStatisNvrByStatisNvrId(statisNvrId);
    }

    public List<BasedataStatisNvr> selectBasedataStatisNvrList(BasedataStatisNvr basedataStatisNvr) {
        return this.basedataStatisNvrMapper.selectBasedataStatisNvrList(basedataStatisNvr);
    }

    public int insertBasedataStatisNvr(BasedataStatisNvr basedataStatisNvr) {
        basedataStatisNvr.setCreateTime(DateUtils.getNowDate());
        return this.basedataStatisNvrMapper.insertBasedataStatisNvr(basedataStatisNvr);
    }

    public int updateBasedataStatisNvr(BasedataStatisNvr basedataStatisNvr) {
        basedataStatisNvr.setUpdateTime(DateUtils.getNowDate());
        return this.basedataStatisNvrMapper.updateBasedataStatisNvr(basedataStatisNvr);
    }

    public int deleteBasedataStatisNvrByStatisNvrIds(Long[] statisNvrIds) {
        return this.basedataStatisNvrMapper.deleteBasedataStatisNvrByStatisNvrIds(statisNvrIds);
    }

    public int deleteBasedataStatisNvrByStatisNvrId(Long statisNvrId) {
        return this.basedataStatisNvrMapper.deleteBasedataStatisNvrByStatisNvrId(statisNvrId);
    }
}
