|
@@ -37,8 +37,7 @@ import java.util.stream.Collectors;
|
|
@Slf4j
|
|
@Slf4j
|
|
public class MigrationLogServiceImpl implements IMigrationLogService {
|
|
public class MigrationLogServiceImpl implements IMigrationLogService {
|
|
@Override
|
|
@Override
|
|
- public AdmResponse queryMigrationLog(InstanceUrlParam context, AdmQueryCriteria request) {
|
|
|
|
- QueryCriteria queryCriteria = AdmQueryCriteriaHelper.toDmpCriteria(request);
|
|
|
|
|
|
+ public AdmResponse queryMigrationLog(InstanceUrlParam context, QueryCriteria queryCriteria) {
|
|
String groupCode = context.getGroupCode();
|
|
String groupCode = context.getGroupCode();
|
|
String projectId = context.getProjectId();
|
|
String projectId = context.getProjectId();
|
|
CommonResult<List<SyncData>> result = DigitalMigrateLogFacade.query(groupCode, projectId, context.getAppId(), context.getUserId(),queryCriteria);
|
|
CommonResult<List<SyncData>> result = DigitalMigrateLogFacade.query(groupCode, projectId, context.getAppId(), context.getUserId(),queryCriteria);
|
|
@@ -51,14 +50,14 @@ public class MigrationLogServiceImpl implements IMigrationLogService {
|
|
processSynDatas(groupCode, projectId, syncDatas);
|
|
processSynDatas(groupCode, projectId, syncDatas);
|
|
AdmResponse response = AdmResponse.success(syncDatas);
|
|
AdmResponse response = AdmResponse.success(syncDatas);
|
|
Long total = result.getCount() == null ? null : result.getCount().longValue();
|
|
Long total = result.getCount() == null ? null : result.getCount().longValue();
|
|
- if(request.isOnlyCount()){
|
|
|
|
|
|
+ if(queryCriteria.isOnlyCount()){
|
|
response.setTotal(null);
|
|
response.setTotal(null);
|
|
response.setCount(total);
|
|
response.setCount(total);
|
|
}else {
|
|
}else {
|
|
response.setTotal(total);
|
|
response.setTotal(total);
|
|
}
|
|
}
|
|
- response.setPageNumber(request.getPageNumber());
|
|
|
|
- response.setPageSize(request.getPageSize());
|
|
|
|
|
|
+ response.setPageNumber(queryCriteria.getPage() == null ? 0 : queryCriteria.getPage().intValue());
|
|
|
|
+ response.setPageSize(queryCriteria.getSize() == null ? 50 : queryCriteria.getSize().intValue());
|
|
return response;
|
|
return response;
|
|
} else {
|
|
} else {
|
|
return AdmResponse.failure(result.getMessage());
|
|
return AdmResponse.failure(result.getMessage());
|
|
@@ -66,8 +65,7 @@ public class MigrationLogServiceImpl implements IMigrationLogService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public AdmResponse deleteMigrationLog(InstanceUrlParam context, AdmQueryCriteria request) {
|
|
|
|
- QueryCriteria queryCriteria = AdmQueryCriteriaHelper.toDmpCriteria(request);
|
|
|
|
|
|
+ public AdmResponse deleteMigrationLog(InstanceUrlParam context, QueryCriteria queryCriteria) {
|
|
String groupCode = context.getGroupCode();
|
|
String groupCode = context.getGroupCode();
|
|
String projectId = context.getProjectId();
|
|
String projectId = context.getProjectId();
|
|
CommonResult result = DigitalMigrateLogFacade.deleteAllLog(groupCode, projectId, context.getAppId(), context.getUserId(),queryCriteria);
|
|
CommonResult result = DigitalMigrateLogFacade.deleteAllLog(groupCode, projectId, context.getAppId(), context.getUserId(),queryCriteria);
|