fix(service): 调整AI聊天消息排序为倒序
This commit is contained in:
@@ -46,8 +46,8 @@ public class KeyboardAiChatMessageServiceImpl extends ServiceImpl<KeyboardAiChat
|
||||
queryWrapper.eq(KeyboardAiChatMessage::getUserId, userId)
|
||||
.eq(KeyboardAiChatMessage::getCompanionId, companionId)
|
||||
.eq(KeyboardAiChatMessage::getSessionId, activeSession.getId())
|
||||
.orderByAsc(KeyboardAiChatMessage::getCreatedAt)
|
||||
.orderByAsc(KeyboardAiChatMessage::getId);
|
||||
.orderByDesc(KeyboardAiChatMessage::getCreatedAt)
|
||||
.orderByDesc(KeyboardAiChatMessage::getId);
|
||||
IPage<KeyboardAiChatMessage> entityPage = this.page(page, queryWrapper);
|
||||
return entityPage.convert(entity -> BeanUtil.copyProperties(entity, ChatMessageHistoryVO.class));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user