Commit 168710ae by 梅存智

修改使用batchInsert批量插入方法keywords字段保存不了

parent 6c12e401
......@@ -107,7 +107,12 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
}
}
int num = researchQuestionMapper.batchInsert(researchQuestions);
//修改使用batchInsert插入时候keywords字段保存不了
int num = 0;
for (TrResearchQuestion question : researchQuestions) {
num += researchQuestionMapper.insert(question);
}
if (num > 0 && hasOptions) {
researchQuestionOptionMapper.batchInsert(optionListToInsert);
}
......@@ -317,7 +322,12 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
}
if (!CollectionUtils.isEmpty(newQuestions) && !needChangeNo) {
result += researchQuestionMapper.batchInsert(newQuestions);
//result += researchQuestionMapper.batchInsert(newQuestions);
//修改使用batchInsert插入时候keywords字段保存不了
for (TrResearchQuestion question : newQuestions) {
result += researchQuestionMapper.insert(question);
}
}
if (!CollectionUtils.isEmpty(newOptions)) {
researchQuestionOptionMapper.batchInsert(newOptions);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment