Skip to content

Commit 1ff1a76

Browse files
committed
feat(chat): 添加问题ID删除解析信息功能
- 在ChatParseMapper接口中新增deleteByQuestionId方法 - 实现按问题ID删除聊天解析数据的功能 - 在XML映射文件中添加对应的DELETE SQL语句
1 parent aa86e3f commit 1ff1a76

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

chat/server/src/main/java/com/tencent/supersonic/chat/server/persistence/mapper/ChatParseMapper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ public interface ChatParseMapper {
1818
List<ChatParseDO> getParseInfoList(List<Long> questionIds);
1919

2020
List<ChatParseDO> getContextualParseInfo(Integer chatId);
21+
22+
int deleteByQuestionId(Long questionId);
2123
}

chat/server/src/main/resources/mapper/ChatParseMapper.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,9 @@
5252
where chat_id = #{chatId} order by question_id desc limit 10
5353
</select>
5454

55+
<delete id="deleteByQuestionId">
56+
delete from s2_chat_parse
57+
where question_id = #{questionId}
58+
</delete>
59+
5560
</mapper>

0 commit comments

Comments
 (0)