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

import net.northking.cctp.common.db.PaginationService;
import net.northking.cctp.device.db.dao.CdDeviceTenantDao;
import net.northking.cctp.device.db.service.CdDeviceTenantService;
import net.northking.cctp.device.db.entity.CdDeviceTenant;

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

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-09-20 16:28:14  <br>
 * @author:  maven-cctp-plugin  <br>
 * @since:  1.0 <br>
 */
@Service
@ConditionalOnMissingBean(name = "CdDeviceTenantServiceImpl")
public class CdDeviceTenantServiceImpl extends PaginationService<CdDeviceTenant> implements CdDeviceTenantService
{
private static final Logger logger = LoggerFactory.getLogger(CdDeviceTenantServiceImpl.class);

  private final CdDeviceTenantDao cdDeviceTenantDao;

  public CdDeviceTenantServiceImpl(CdDeviceTenantDao cdDeviceTenantDao) {this.cdDeviceTenantDao = cdDeviceTenantDao;}

  public BasicDao<CdDeviceTenant> getDao() {return cdDeviceTenantDao;}

  public CdDeviceTenant createEntity() { return new CdDeviceTenant();}

  @Override
  public Integer recycleDevice() {
    Integer recycleNum = this.cdDeviceTenantDao.recycleDevice();
    return recycleNum;
  }

  @Override
  public List<String> queryExpiredDevice() {
    return this.cdDeviceTenantDao.queryExpiredDevice();
  }

  @Override
  public List<String> findDeviceByType(String tenantId) {
    List<String> list = this.cdDeviceTenantDao.findDeviceByType(tenantId);
    return list;
  }

  @Override
  protected void beforeInsert(CdDeviceTenant record) {
    
  }

  @Override
  protected void beforeUpdate(CdDeviceTenant record) {

  }







}

