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

import net.northking.cctp.dataPool.db.dao.DataSetTreeDao;
import net.northking.cctp.dataPool.db.service.DataSetTreeService;
import net.northking.cctp.dataPool.db.entity.DataSetTree;

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

import net.northking.cctp.dataPool.dto.dataSets.DataSetTreeDetailDto;
import net.northking.cctp.dataPool.dto.dataSets.DataSetTreeMoveDto;
import net.northking.cctp.dataPool.dto.dataSets.DataSetTreeQueryDto;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 数据集树目录表
 *
 * <p>文件内容由代码生成器产生，请不要手动修改！ <br>
 * createdate:  2022-10-24 16:58:38  <br>
 * @author:  maven-cctp-plugin  <br>
 * @since:  1.0 <br>
 */
@Service
@ConditionalOnMissingBean(name = "DataSetTreeServiceImpl")
public class DataSetTreeServiceImpl extends TenantEntityService<DataSetTree> implements DataSetTreeService
{
  private final DataSetTreeDao dataSetTreeDao;

  public DataSetTreeServiceImpl(DataSetTreeDao dataSetTreeDao) {this.dataSetTreeDao = dataSetTreeDao;}

  public BasicDao<DataSetTree> getDao() {return dataSetTreeDao;}

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

  @Override
  public int updateChildNamePath(DataSetTree childSetTrees, String namePathNew) {
    return dataSetTreeDao.updateChildNamePath(childSetTrees, namePathNew);
  }

  @Override
  public List<DataSetTreeDetailDto> selectDataSetTree(DataSetTreeQueryDto setTreeQueryDto) {
    return dataSetTreeDao.selectDataSetTree(setTreeQueryDto);
  }

  @Override
  public List<DataSetTreeDetailDto> queryChildrenTreeList(String treeId) {
    return dataSetTreeDao.queryChildrenTreeList(treeId);
  }

  @Override
  public List<DataSetTree> queryByIds(List<String> list) {
    return dataSetTreeDao.queryByIds(list);
  }

  @Override
  public int countMaxLevelNo(DataSetTree queryLevel) {
    return dataSetTreeDao.countMaxLevelNo(queryLevel);
  }

  @Override
  public void updateSeqByMove(DataSetTreeMoveDto childUp) {
    dataSetTreeDao.updateSeqByMove(childUp);
  }

  @Override
  public int updateChildIdPath(DataSetTree child, String path) {
    return dataSetTreeDao.updateChildIdPath(child, path);
  }
}

