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

import com.inspect.metadata.montdata.domain.BasedataMontPatDevOnline;
import com.inspect.metadata.montdata.mapper.BasedataMontPatDevOnlineMapper;
import com.inspect.metadata.montdata.service.IBasedataMontPatDevOnlineService;
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 BasedataMontPatDevOnlineServiceImpl implements IBasedataMontPatDevOnlineService {
    @Resource
    private BasedataMontPatDevOnlineMapper basedataMontPatdevOnlineMapper;

    public BasedataMontPatDevOnline selectBasedataMontPatDevOnlineByPatDevOnlineId(Long patDevOnlineId) {
        return this.basedataMontPatdevOnlineMapper.selectBasedataMontPatDevOnlineByPatDevOnlineId(patDevOnlineId);
    }

    public List<BasedataMontPatDevOnline> selectBasedataMontPatDevOnlineList(BasedataMontPatDevOnline basedataMontPatDevOnline) {
        return this.basedataMontPatdevOnlineMapper.selectBasedataMontPatDevOnlineList(basedataMontPatDevOnline);
    }

    public int insertBasedataMontPatDevOnline(BasedataMontPatDevOnline basedataMontPatDevOnline) {
        basedataMontPatDevOnline.setCreateTime(DateUtils.getNowDate());
        return this.basedataMontPatdevOnlineMapper.insertBasedataMontPatDevOnline(basedataMontPatDevOnline);
    }

    public int updateBasedataMontPatDevOnline(BasedataMontPatDevOnline basedataMontPatDevOnline) {
        basedataMontPatDevOnline.setUpdateTime(DateUtils.getNowDate());
        return this.basedataMontPatdevOnlineMapper.updateBasedataMontPatDevOnline(basedataMontPatDevOnline);
    }

    public int deleteBasedataMontPatDevOnlineByPatDevOnlineIds(Long[] patDevOnlineIds) {

        return this.basedataMontPatdevOnlineMapper.deleteBasedataMontPatDevOnlineByPatDevOnlineIds(patDevOnlineIds);
    }

    public int deleteBasedataMontPatDevOnlineByPatDevOnlineId(Long patDevOnlineId) {
        return this.basedataMontPatdevOnlineMapper.deleteBasedataMontPatDevOnlineByPatDevOnlineId(patDevOnlineId);
    }
}
