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

View File

@@ -432,6 +432,8 @@ onMounted(() => {
<el-select v-model="modelForm.modelApiType" placeholder="请选择API类型"> <el-select v-model="modelForm.modelApiType" placeholder="请选择API类型">
<el-option label="OpenAI" :value="0" /> <el-option label="OpenAI" :value="0" />
<el-option label="Claude" :value="1" /> <el-option label="Claude" :value="1" />
<el-option label="Response" :value="2" />
<el-option label="GenerateContent" :value="3" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="图标URL"> <el-form-item label="图标URL">