[improvement][headless]Use LamdaQueryWrapper to avoid hard-coded column names.

This commit is contained in:
jerryjzhang
2024-12-03 19:47:49 +08:00
parent fe57a4e5cf
commit 02c6a7d404
6 changed files with 35 additions and 32 deletions

View File

@@ -56,7 +56,7 @@ public class QueryRecommendProcessor implements ParseResultProcessor {
private void updateChatQuery(ChatQueryDO chatQueryDO) {
ChatQueryRepository chatQueryRepository = ContextUtils.getBean(ChatQueryRepository.class);
UpdateWrapper<ChatQueryDO> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("question_id", chatQueryDO.getQuestionId());
updateWrapper.lambda().eq(ChatQueryDO::getQuestionId, chatQueryDO.getQuestionId());
chatQueryRepository.updateChatQuery(chatQueryDO, updateWrapper);
}
}