package com.zy.asrs.service;
|
|
import com.baomidou.mybatisplus.service.IService;
|
import com.zy.asrs.entity.ApkBuildTask;
|
|
import java.util.List;
|
|
/**
|
* APK打包任务Service接口
|
*/
|
public interface ApkBuildTaskService extends IService<ApkBuildTask> {
|
|
/**
|
* 触发打包任务
|
*
|
* @param buildType 打包类型(release/debug)
|
* @param repoAlias 仓库别名
|
* @param branch 分支名称
|
* @return 创建的任务实体
|
*/
|
ApkBuildTask triggerBuild(String buildType, String repoAlias, String branch) throws Exception;
|
|
/**
|
* 刷新指定任务的状态
|
*
|
* @param id 任务ID
|
* @return 更新后的任务实体
|
*/
|
ApkBuildTask refreshStatus(Long id) throws Exception;
|
|
/**
|
* 刷新所有进行中的任务状态
|
*
|
* @return 更新的任务数量
|
*/
|
int refreshAllPendingTasks();
|
|
/**
|
* 下载APK文件到本地服务器
|
*
|
* @param id 任务ID
|
* @return 本地APK文件路径
|
*/
|
String downloadApk(Long id) throws Exception;
|
|
/**
|
* 通过ADB安装APK到指定设备
|
*
|
* @param id 任务ID
|
* @param deviceIp 设备IP地址
|
* @return 安装结果信息
|
*/
|
String installApk(Long id, String deviceIp) throws Exception;
|
|
/**
|
* 批量安装APK到多台设备
|
*
|
* @param id 任务ID
|
* @param deviceIps 设备IP列表
|
* @return 安装结果列表
|
*/
|
List<String> installApkToMultipleDevices(Long id, List<String> deviceIps);
|
|
/**
|
* 查询所有进行中的任务
|
*
|
* @return 进行中的任务列表
|
*/
|
List<ApkBuildTask> getPendingTasks();
|
}
|