实现七月迭代公共技术基础
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s
This commit is contained in:
@@ -279,6 +279,7 @@ func (s *Service) CancelTask(ctx context.Context, id uint) (*dto.CancelExportTas
|
||||
func toTaskItemDTO(task *model.ExportTask) *dto.ExportTaskItem {
|
||||
return &dto.ExportTaskItem{
|
||||
ID: task.ID,
|
||||
TaskID: task.ID,
|
||||
TaskNo: task.TaskNo,
|
||||
Scene: task.Scene,
|
||||
Format: task.Format,
|
||||
@@ -290,10 +291,16 @@ func toTaskItemDTO(task *model.ExportTask) *dto.ExportTaskItem {
|
||||
TotalShards: task.TotalShards,
|
||||
SuccessShards: task.SuccessShards,
|
||||
FailedShards: task.FailedShards,
|
||||
TotalCount: task.TotalShards,
|
||||
SuccessCount: task.SuccessShards,
|
||||
FailedCount: task.FailedShards,
|
||||
CancelRequested: task.CancelRequested,
|
||||
FileKey: task.FileKey,
|
||||
ErrorMessage: task.ErrorMessage,
|
||||
ErrorCode: exportTaskErrorCode(task),
|
||||
ErrorSummary: task.ErrorMessage,
|
||||
CreatedAt: task.CreatedAt,
|
||||
UpdatedAt: task.UpdatedAt,
|
||||
StartedAt: task.StartedAt,
|
||||
CompletedAt: task.CompletedAt,
|
||||
CreatorUserID: task.CreatorUserID,
|
||||
@@ -302,3 +309,10 @@ func toTaskItemDTO(task *model.ExportTask) *dto.ExportTaskItem {
|
||||
CreatorEnterpriseID: task.CreatorEnterpriseID,
|
||||
}
|
||||
}
|
||||
|
||||
func exportTaskErrorCode(task *model.ExportTask) string {
|
||||
if task.ErrorMessage == "" {
|
||||
return ""
|
||||
}
|
||||
return "EXPORT_TASK_FAILED"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user