mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
调整首页智能体排序
This commit is contained in:
parent
c1959e0795
commit
dfd2b8916a
1 changed files with 1 additions and 1 deletions
|
|
@ -129,7 +129,7 @@ public class AgentServiceImpl extends BaseServiceImpl<AgentDao, AgentEntity> imp
|
||||||
@Override
|
@Override
|
||||||
public List<AgentDTO> getUserAgents(Long userId) {
|
public List<AgentDTO> getUserAgents(Long userId) {
|
||||||
QueryWrapper<AgentEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<AgentEntity> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq("user_id", userId);
|
wrapper.eq("user_id", userId).orderByDesc("created_at");
|
||||||
List<AgentEntity> agents = agentDao.selectList(wrapper);
|
List<AgentEntity> agents = agentDao.selectList(wrapper);
|
||||||
return agents.stream().map(agent -> {
|
return agents.stream().map(agent -> {
|
||||||
AgentDTO dto = new AgentDTO();
|
AgentDTO dto = new AgentDTO();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue