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

import net.northking.cctp.common.http.QueryByPage;
import net.northking.cctp.scriptcase.db.dao.AtuSceneInfoDao;
import net.northking.cctp.scriptcase.db.service.AtuSceneInfoService;
import net.northking.cctp.scriptcase.db.entity.AtuSceneInfo;

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

import net.northking.cctp.scriptcase.dto.atuScript.atuScriptInfo.PrincipalUpdateDto;
import net.northking.cctp.scriptcase.dto.sceneScript.AtuSceneInfoDetailDto;
import net.northking.cctp.scriptcase.dto.sceneScript.AtuSceneScriptPagingQueryDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;


/**
 * 场景脚本信息表
 *
 * <p>文件内容由代码生成器产生，请不要手动修改！ <br>
 * createdate:  2022-11-29 10:19:09  <br>
 * @author:  maven-cctp-plugin  <br>
 * @since:  1.0 <br>
 */
@Service
@ConditionalOnMissingBean(name = "AtuSceneInfoServiceImpl")
public class AtuSceneInfoServiceImpl extends PaginationService<AtuSceneInfo> implements AtuSceneInfoService
{
private static final Logger logger = LoggerFactory.getLogger(AtuSceneInfoServiceImpl.class);

  private final AtuSceneInfoDao atuSceneInfoDao;

  public AtuSceneInfoServiceImpl(AtuSceneInfoDao atuSceneInfoDao) {this.atuSceneInfoDao = atuSceneInfoDao;}

  public BasicDao<AtuSceneInfo> getDao() {return atuSceneInfoDao;}

  public AtuSceneInfo createEntity() { return new AtuSceneInfo();}
  /**
   * 根据索引查找
          * @param id 场景脚本ID
   */
  public AtuSceneInfo findByIndexByPkScriptId (String id)
  {
    return atuSceneInfoDao.findByPkScriptId(id);
  }

  @Override
  public List<AtuSceneInfoDetailDto> queryList(QueryByPage<AtuSceneScriptPagingQueryDto>
               queryByPage)
  {
    return atuSceneInfoDao.queryList(queryByPage.getQuery());
  }

  @Override
  public List<AtuSceneInfo> querySceneByList(List<String> sceneId) {
    if (sceneId == null || sceneId.isEmpty()) {
      return new ArrayList<>();
    }
    return atuSceneInfoDao.querySceneByList(sceneId);
  }

  @Override
  public Integer updatePrincipal(PrincipalUpdateDto dto) {
    return atuSceneInfoDao.updatePrincipal(dto);
  }

    @Override
    public List<String> selectManagerByProject(String projectId) {
        return atuSceneInfoDao.selectManagerByProject(projectId);
    }
    @Override
    public List<String> selectCreatorByProject(String projectId) {
        return atuSceneInfoDao.selectCreatorByProject(projectId);
    }

    @Override
    public List<String> selectUpdaterByProject(String projectId) {
        return atuSceneInfoDao.selectUpdaterByProject(projectId);
    }

    @Override
  protected void beforeInsert(AtuSceneInfo atuSceneInfo) {

  }

  @Override
  protected void beforeUpdate(AtuSceneInfo atuSceneInfo) {

  }







}

