feat: 新增错误信息返回
This commit is contained in:
@@ -56,4 +56,9 @@ public class ImageTaskOutput
|
|||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreationTime { get; set; }
|
public DateTime CreationTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 错误信息
|
||||||
|
/// </summary>
|
||||||
|
public string? ErrorInfo { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public class AiImageService : ApplicationService
|
|||||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||||
private readonly TokenManager _tokenManager;
|
private readonly TokenManager _tokenManager;
|
||||||
private readonly ISqlSugarRepository<AiModelEntity> _aiModelRepository;
|
private readonly ISqlSugarRepository<AiModelEntity> _aiModelRepository;
|
||||||
|
|
||||||
public AiImageService(
|
public AiImageService(
|
||||||
ISqlSugarRepository<ImageStoreTaskAggregateRoot> imageTaskRepository,
|
ISqlSugarRepository<ImageStoreTaskAggregateRoot> imageTaskRepository,
|
||||||
IBackgroundJobManager backgroundJobManager,
|
IBackgroundJobManager backgroundJobManager,
|
||||||
@@ -43,7 +44,8 @@ public class AiImageService : ApplicationService
|
|||||||
PremiumPackageManager premiumPackageManager,
|
PremiumPackageManager premiumPackageManager,
|
||||||
ModelManager modelManager,
|
ModelManager modelManager,
|
||||||
IGuidGenerator guidGenerator,
|
IGuidGenerator guidGenerator,
|
||||||
IWebHostEnvironment webHostEnvironment, TokenManager tokenManager, ISqlSugarRepository<AiModelEntity> aiModelRepository)
|
IWebHostEnvironment webHostEnvironment, TokenManager tokenManager,
|
||||||
|
ISqlSugarRepository<AiModelEntity> aiModelRepository)
|
||||||
{
|
{
|
||||||
_imageTaskRepository = imageTaskRepository;
|
_imageTaskRepository = imageTaskRepository;
|
||||||
_backgroundJobManager = backgroundJobManager;
|
_backgroundJobManager = backgroundJobManager;
|
||||||
@@ -174,6 +176,7 @@ public class AiImageService : ApplicationService
|
|||||||
{
|
{
|
||||||
mimeType = header.Split(':')[1].Split(';')[0];
|
mimeType = header.Split(':')[1].Split(';')[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
base64Content = parts[1];
|
base64Content = parts[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -253,7 +256,10 @@ public class AiImageService : ApplicationService
|
|||||||
// StoreBase64 = x.StoreBase64,
|
// StoreBase64 = x.StoreBase64,
|
||||||
StoreUrl = x.StoreUrl,
|
StoreUrl = x.StoreUrl,
|
||||||
TaskStatus = x.TaskStatus,
|
TaskStatus = x.TaskStatus,
|
||||||
CreationTime = x.CreationTime
|
PublishStatus = x.PublishStatus,
|
||||||
|
Categories = x.Categories,
|
||||||
|
CreationTime = x.CreationTime,
|
||||||
|
ErrorInfo = x.ErrorInfo
|
||||||
})
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user