mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-30 09:48:43 +08:00 
			
		
		
		
	【增加】查询对话 message 列表
This commit is contained in:
		| @@ -18,25 +18,16 @@ import java.util.List; | |||||||
| @Mapper | @Mapper | ||||||
| public interface AiChatMessageMapper extends BaseMapperX<AiChatMessageDO> { | 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查询 |      * 查询 - 根据 对话id查询 | ||||||
|      * |      * | ||||||
|      * @param conversationId |      * @param conversationId | ||||||
|      */ |      */ | ||||||
|     default List<AiChatMessageDO> selectByConversationId(Long 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