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
448ac294
Commit
448ac294
authored
Mar 05, 2025
by
梅存智
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
修改使用batchInsert批量插入方法keywords字段保存不了 See merge request
!12
parents
c91c2994
decbf851
Show 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 @
448ac294
...
@@ -107,7 +107,12 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
...
@@ -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
)
{
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