Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
research-project
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
research-project
Commits
168710ae
Commit
168710ae
authored
Mar 05, 2025
by
梅存智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改使用batchInsert批量插入方法keywords字段保存不了
parent
6c12e401
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
cloud-research-service/src/main/java/com/yizhi/research/application/service/impl/TrResearchQuestionServiceImpl.java
+12
-2
No files found.
cloud-research-service/src/main/java/com/yizhi/research/application/service/impl/TrResearchQuestionServiceImpl.java
View file @
168710ae
...
@@ -106,8 +106,13 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
...
@@ -106,8 +106,13 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
}
}
}
}
}
}
//修改使用batchInsert插入时候keywords字段保存不了
int
num
=
0
;
for
(
TrResearchQuestion
question
:
researchQuestions
)
{
num
+=
researchQuestionMapper
.
insert
(
question
);
}
int
num
=
researchQuestionMapper
.
batchInsert
(
researchQuestions
);
if
(
num
>
0
&&
hasOptions
)
{
if
(
num
>
0
&&
hasOptions
)
{
researchQuestionOptionMapper
.
batchInsert
(
optionListToInsert
);
researchQuestionOptionMapper
.
batchInsert
(
optionListToInsert
);
}
}
...
@@ -317,7 +322,12 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
...
@@ -317,7 +322,12 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
}
}
if
(!
CollectionUtils
.
isEmpty
(
newQuestions
)
&&
!
needChangeNo
)
{
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
))
{
if
(!
CollectionUtils
.
isEmpty
(
newOptions
))
{
researchQuestionOptionMapper
.
batchInsert
(
newOptions
);
researchQuestionOptionMapper
.
batchInsert
(
newOptions
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment