/*
* Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.
*
*/
package net.northking.cctp.executePlan.db.impl;

import net.northking.cctp.executePlan.db.dao.AtuPlanBatchDeviceLinkDao;
import net.northking.cctp.executePlan.db.service.AtuPlanBatchDeviceLinkService;
import net.northking.cctp.executePlan.db.entity.AtuPlanBatchDeviceLink;

import net.northking.cctp.common.db.BasicDao;
import net.northking.cctp.common.db.PaginationService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 计划批次设备关联表
 *
 * <p>文件内容由代码生成器产生，请不要手动修改！ <br>
 * createdate:  2022-12-12 16:22:12  <br>
 * @author:  maven-cctp-plugin  <br>
 * @since:  1.0 <br>
 */
@Service
@ConditionalOnMissingBean(name = "AtuPlanBatchDeviceLinkServiceImpl")
public class AtuPlanBatchDeviceLinkServiceImpl extends PaginationService<AtuPlanBatchDeviceLink> implements AtuPlanBatchDeviceLinkService
{
private static final Logger logger = LoggerFactory.getLogger(AtuPlanBatchDeviceLinkServiceImpl.class);

  private final AtuPlanBatchDeviceLinkDao atuPlanBatchDeviceLinkDao;

  public AtuPlanBatchDeviceLinkServiceImpl(AtuPlanBatchDeviceLinkDao atuPlanBatchDeviceLinkDao) {this.atuPlanBatchDeviceLinkDao = atuPlanBatchDeviceLinkDao;}

  @Override
  public BasicDao<AtuPlanBatchDeviceLink> getDao() {return atuPlanBatchDeviceLinkDao;}

  @Override
  public AtuPlanBatchDeviceLink createEntity() { return new AtuPlanBatchDeviceLink();}

  @Override
  protected void beforeInsert(AtuPlanBatchDeviceLink record) {

  }

  @Override
  protected void beforeUpdate(AtuPlanBatchDeviceLink record) {

  }

    @Override
    public List<AtuPlanBatchDeviceLink> queryByOfflineDeviceId(String deviceId) {
        return atuPlanBatchDeviceLinkDao.queryByOfflineDeviceId(deviceId);
    }

  @Override
  public Integer countOnlineDeviceByBatchId(String batchId) {
    return atuPlanBatchDeviceLinkDao.countOnlineDeviceByBatchId(batchId);
  }

}

