#
Junjie
2026-01-29 bc9cc84b5d074076692eedf4951584bb17f8985f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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 androidTarget, String repoAlias, String branch, String serverUrl) 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();
}