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

import com.hzbank.testteam.autotest.dependencies.baseDefineDependency.vo.ApiScriptOptionVO;
import net.northking.cctp.common.db.BasicService;
import net.northking.cctp.common.db.Pagination;
import net.northking.cctp.common.http.QueryByPage;
import net.northking.cctp.scriptcase.db.entity.AtuScriptInfo;
import net.northking.cctp.scriptcase.dto.atuScript.atuScriptGroup.PublishScriptQueryDto;
import net.northking.cctp.scriptcase.dto.atuScript.atuScriptInfo.AtuScriptInfoDetailDto;
import net.northking.cctp.scriptcase.dto.atuScript.atuScriptInfo.AtuScriptInfoQueryDto;
import net.northking.cctp.scriptcase.dto.atuScript.atuScriptInfo.PrincipalUpdateDto;

import java.util.List;
import java.util.Set;

/**
 * 脚本信息表
 *
 * <p>文件内容由代码生成器产生，请不要手动修改！ <br>
 * createdate:  2022-10-18 17:29:31  <br>
 * @author:  maven-cctp-plugin  <br>
 * @since:  1.0 <br>
 */
public interface AtuScriptInfoService extends BasicService<AtuScriptInfo>
{

  /**
   * 根据脚本名称统计脚本数量
   * @param scriptName
   * @param projectId
   * @return
   */
  Integer countScriptByScriptName(String scriptName, String projectId);

  /**
   * 条件查询脚本列表
   * @param query
   * @return
   */
  List<AtuScriptInfoDetailDto> queryScriptList(QueryByPage<AtuScriptInfoQueryDto> query);

  /**
   * 删除脚本列表
   * @param scriptInfo
   * @param scriptIds
   * @return
   */
  Integer deleteScriptList(AtuScriptInfo scriptInfo, List<String> scriptIds);

  /**
   * 查询复制时同名的脚本
   * @param groupId
   * @param scriptName
   * @return
   */
  List<AtuScriptInfo> findScriptCopyNum(String groupId, String scriptName);

  /**
   * 根据id列表查询脚本
   * @param scriptIds
   * @return
   */
  List<AtuScriptInfo> queryScriptByIds(List<String> scriptIds);

  Pagination<AtuScriptInfo> queryAppByScript(QueryByPage<List<String>> queryByPage);

  AtuScriptInfo queryScriptInfo(String caseId);

  List<AtuScriptInfo> queryAppByCaseId(List<String> scriptIds);


  List<AtuScriptInfoDetailDto> getPublishScriptList(PublishScriptQueryDto dto);

  /**
   * 查询脚本详情
   * @param scriptIdSet 脚本id集合
   * @return 结果集
   */
    List<AtuScriptInfoDetailDto> queryScriptDetailList(Set<String> scriptIdSet);

    Integer updatePrincipal(PrincipalUpdateDto dto);

    List<String> queryScriptPlatforms(Set<String> scriptIdSet);

  List<String> selectManagerByProject(String projectId);

  List<String> selectCreatorByProject(String projectId);

  List<String> selectUpdaterByProject(String projectId);


  List<ApiScriptOptionVO> queryScriptVOList(List<String> scriptIdList);

    List<ApiScriptOptionVO> queryScriptVOByCodeAndSystemId(String scriptCode, String systemId);
}
