mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-11-01 03:28:41 +08:00 
			
		
		
		
	【增加】查询对话 message 列表
This commit is contained in:
		| @ -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) | ||||
|         ); | ||||
|     } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 cherishsince
					cherishsince