feature: 优化排序

This commit is contained in:
ccnetcore
2026-01-02 00:51:05 +08:00
parent 80dcd76749
commit a1be2bebf7
2 changed files with 4 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ public class ChannelService : ApplicationService, IChannelService
var entities = await _appRepository._DbQueryable
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), x => x.Name.Contains(input.SearchKey))
.OrderBy(x => x.OrderNum)
.OrderByDescending(x => x.OrderNum)
.OrderByDescending(x => x.CreationTime)
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
@@ -230,6 +230,7 @@ public class ChannelService : ApplicationService, IChannelService
/// <summary>
/// 删除AI模型(软删除)
/// </summary>
[HttpDelete("channel/model/{id}")]
public async Task DeleteModelAsync(Guid id)
{
await _modelRepository.DeleteByIdAsync(id);