fix: 修复模型为空问题

This commit is contained in:
ccnetcore
2026-01-03 01:45:27 +08:00
parent 9d1dd72584
commit e39cbaf5e7
2 changed files with 3 additions and 2 deletions

View File

@@ -334,11 +334,12 @@ public class AiImageService : ApplicationService
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost("ai-image/model")] [HttpPost("ai-image/model")]
[AllowAnonymous]
public async Task<List<ModelGetListOutput>> GetModelAsync() public async Task<List<ModelGetListOutput>> GetModelAsync()
{ {
var output = await _aiModelRepository._DbQueryable var output = await _aiModelRepository._DbQueryable
.Where(x => x.ModelType == ModelTypeEnum.Image) .Where(x => x.ModelType == ModelTypeEnum.Image)
.Where(x => x.ModelApiType == ModelApiTypeEnum.OpenAi) .Where(x => x.ModelApiType == ModelApiTypeEnum.GenerateContent)
.OrderByDescending(x => x.OrderNum) .OrderByDescending(x => x.OrderNum)
.Select(x => new ModelGetListOutput .Select(x => new ModelGetListOutput
{ {

View File

@@ -113,7 +113,7 @@ namespace Yi.Abp.Web
//本地开发环境,可以禁用作业执行 //本地开发环境,可以禁用作业执行
if (host.IsDevelopment()) if (host.IsDevelopment())
{ {
//Configure<AbpBackgroundWorkerOptions>(options => { options.IsEnabled = false; }); Configure<AbpBackgroundWorkerOptions>(options => { options.IsEnabled = false; });
} }
//请求日志 //请求日志