| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.ApkBuildTask; |
| | | import com.zy.asrs.mapper.ApkBuildTaskMapper; |
| | | import com.zy.asrs.service.ApkBuildTaskService; |
| | |
| | | task.setQueueSize(queueSize); |
| | | task.setCreatedAt(new Date()); |
| | | |
| | | this.insert(task); |
| | | this.save(task); |
| | | return task; |
| | | } |
| | | |
| | | @Override |
| | | public ApkBuildTask refreshStatus(Long id) throws Exception { |
| | | ApkBuildTask task = this.selectById(id); |
| | | ApkBuildTask task = this.getById(id); |
| | | if (task == null) { |
| | | throw new RuntimeException("任务不存在"); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public String downloadApk(Long id) throws Exception { |
| | | ApkBuildTask task = this.selectById(id); |
| | | ApkBuildTask task = this.getById(id); |
| | | if (task == null) { |
| | | throw new RuntimeException("任务不存在"); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public String installApk(Long id, String deviceIp) throws Exception { |
| | | ApkBuildTask task = this.selectById(id); |
| | | ApkBuildTask task = this.getById(id); |
| | | if (task == null) { |
| | | throw new RuntimeException("任务不存在"); |
| | | } |