调整智能体管理list接口排序,根据创建时间倒序返回

This commit is contained in:
LJH-rgsze 2026-01-09 14:28:01 +08:00
parent da7a6933f5
commit 77b4a416a9
2 changed files with 2 additions and 2 deletions

View file

@ -277,4 +277,4 @@ public class AgentController {
} };

View file

@ -130,7 +130,7 @@ public class AgentServiceImpl extends BaseServiceImpl<AgentDao, AgentEntity> imp
@Override @Override
public List<AgentDTO> getUserAgents(Long userId, String keyword, String searchType) { public List<AgentDTO> getUserAgents(Long userId, String keyword, String searchType) {
QueryWrapper<AgentEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<AgentEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", userId); queryWrapper.eq("user_id", userId).orderByDesc("created_at");
// 如果有搜索关键词,根据搜索类型添加相应的查询条件 // 如果有搜索关键词,根据搜索类型添加相应的查询条件
if (StringUtils.isNotBlank(keyword)) { if (StringUtils.isNotBlank(keyword)) {