69 lines
1.8 KiB
Java
69 lines
1.8 KiB
Java
|
package com.bocloud.sms.interfaces;
|
||
|
|
||
|
import com.bocloud.sms.entity.UpgradeHistory;
|
||
|
import com.bocloud.sms.entity.UpgradeTask;
|
||
|
import com.megatron.common.model.GeneralResult;
|
||
|
import com.megatron.common.model.GridBean;
|
||
|
import com.megatron.common.model.Pager;
|
||
|
import com.megatron.common.model.RequestContext;
|
||
|
|
||
|
/**
|
||
|
* 系统升级
|
||
|
*
|
||
|
* @author luyanchao
|
||
|
* @date 2021-06-15
|
||
|
*/
|
||
|
public interface UpgradeService {
|
||
|
|
||
|
/**
|
||
|
* 执行数据迁移
|
||
|
*
|
||
|
* @param url 源数据源url
|
||
|
* @param user 源数据源用户名
|
||
|
* @param pass 源数据源密文密码
|
||
|
* @return 成功/失败
|
||
|
*/
|
||
|
GeneralResult<Boolean> newMigration(String url, String user, String pass, RequestContext requestContext);
|
||
|
|
||
|
/**
|
||
|
* 重试数据迁移
|
||
|
*
|
||
|
* @param id 历史数据迁移任务id
|
||
|
* @return 成功/失败
|
||
|
*/
|
||
|
GeneralResult<Boolean> retryMigration(Long id, RequestContext requestContext);
|
||
|
|
||
|
/**
|
||
|
* 查询数据迁移历史任务列表
|
||
|
*
|
||
|
* @param pager 查询分页
|
||
|
* @return 分页结果
|
||
|
*/
|
||
|
GeneralResult<GridBean<UpgradeHistory>> listUpgradeHistory(Pager pager);
|
||
|
|
||
|
/**
|
||
|
* 查询数据迁移历史任务详情
|
||
|
*
|
||
|
* @param id 任务id
|
||
|
* @return 任务详情
|
||
|
*/
|
||
|
GeneralResult<UpgradeHistory> getUpgradeHistory(Long id);
|
||
|
|
||
|
/**
|
||
|
* 查询数据迁移历史任务中的子任务列表
|
||
|
*
|
||
|
* @param upgradeHistoryId 数据迁移历史id
|
||
|
* @param pager 查询分页
|
||
|
* @return 分页结果
|
||
|
*/
|
||
|
GeneralResult<GridBean<UpgradeTask>> listUpgradeTask(Long upgradeHistoryId, Pager pager);
|
||
|
|
||
|
/**
|
||
|
* 重试子任务
|
||
|
*
|
||
|
* @param taskId 子任务id
|
||
|
* @return 成功/失败
|
||
|
*/
|
||
|
GeneralResult<Boolean> retryUpgradeTask(Long taskId, RequestContext context);
|
||
|
}
|