mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
【增加】查询对话 message 列表
This commit is contained in:
parent
7fae5c0a7d
commit
c124681c3a
@ -18,25 +18,16 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface AiChatMessageMapper extends BaseMapperX<AiChatMessageDO> {
|
||||
|
||||
/**
|
||||
* 删除 - 根据 Conversation 和 id
|
||||
*
|
||||
* @param chatConversationId
|
||||
* @param id
|
||||
*/
|
||||
default int deleteByConversationAndId(Long chatConversationId, Long id) {
|
||||
return this.delete(new LambdaQueryWrapperX<AiChatMessageDO>()
|
||||
.eq(AiChatMessageDO::getConversationId, chatConversationId)
|
||||
.eq(AiChatMessageDO::getId, id)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询 - 根据 对话id查询
|
||||
*
|
||||
* @param conversationId
|
||||
*/
|
||||
default List<AiChatMessageDO> selectByConversationId(Long conversationId) {
|
||||
return selectList()
|
||||
return this.selectList(
|
||||
new LambdaQueryWrapperX<AiChatMessageDO>()
|
||||
.eq(AiChatMessageDO::getConversationId, conversationId)
|
||||
.orderByAsc(AiChatMessageDO::getId)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user