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

import com.inspect.metadata.eqpbook.domain.BasedataEqpBook;
import com.inspect.metadata.eqpbook.domain.BasedataEqpBookChannel;
import com.inspect.metadata.eqpbook.mapper.BasedataEqpBookChannelMapper;
import com.inspect.metadata.eqpbook.service.IBasedataEqpBookChannelService;
import com.inspect.base.core.utils.DateUtils;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BasedataEqpBookChannelServiceImpl implements IBasedataEqpBookChannelService {
   @Autowired
   private BasedataEqpBookChannelMapper basedataEqpbookChannelMapper;

   public BasedataEqpBookChannel selectBasedataEqpBookChannelByChannelId(Long channelId) {
      return this.basedataEqpbookChannelMapper.selectBasedataEqpBookChannelByChannelId(channelId);
   }

   public BasedataEqpBookChannel selectBasedataEqpBookChannelByChannelCode(String channelCode) {
      return this.basedataEqpbookChannelMapper.selectBasedataEqpBookChannelByChannelCode(channelCode);
   }

   public List<BasedataEqpBookChannel> selectBasedataEqpBookChannelList(BasedataEqpBookChannel basedataEqpbookChannel) {
      return this.basedataEqpbookChannelMapper.selectBasedataEqpBookChannelList(basedataEqpbookChannel);
   }

   public int insertBasedataEqpBookChannel(BasedataEqpBookChannel basedataEqpbookChannel) {
      basedataEqpbookChannel.setCreateTime(DateUtils.getNowDate());
      return this.basedataEqpbookChannelMapper.insertBasedataEqpBookChannel(basedataEqpbookChannel);
   }

   public int updateBasedataEqpBookChannel(BasedataEqpBookChannel basedataEqpbookChannel) {
      basedataEqpbookChannel.setUpdateTime(DateUtils.getNowDate());
      return this.basedataEqpbookChannelMapper.updateBasedataEqpBookChannel(basedataEqpbookChannel);
   }

   public int deleteBasedataEqpBookChannelByChannelIds(Long[] channelIds) {
      return this.basedataEqpbookChannelMapper.deleteBasedataEqpBookChannelByChannelIds(channelIds);
   }

   public int deleteBasedataEqpBookChannelByChannelId(Long channelId) {
      return this.basedataEqpbookChannelMapper.deleteBasedataEqpBookChannelByChannelId(channelId);
   }

   public List<BasedataEqpBookChannel> getChannelByEqpBookCode(BasedataEqpBook basedataEqpbook) {
      return this.basedataEqpbookChannelMapper.getChannelByEqpBookCode(basedataEqpbook);
   }
}
