Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
fffe6732
Commit
fffe6732
authored
Dec 27, 2022
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考试试题数量 gengdidi
parent
f4d5ba2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
TTrainCourseTopicServiceImpl.java
...ong/system/service/impl/TTrainCourseTopicServiceImpl.java
+7
-2
No files found.
danger-manage-system/src/main/java/com/zehong/system/service/impl/TTrainCourseTopicServiceImpl.java
View file @
fffe6732
package
com
.
zehong
.
system
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.TBankSubject
;
...
...
@@ -144,6 +143,7 @@ public class TTrainCourseTopicServiceImpl implements ITTrainCourseTopicService
return
0
;
}
List
<
TTrainCourseTopic
>
topics
=
new
ArrayList
<>();
int
count
=
0
;
for
(
BatchTopicVo
.
TopicInfos
topic
:
batchTopicVo
.
getTopicInfos
()){
//获取题库试题
TBankSubject
tBankSubject
=
new
TBankSubject
();
...
...
@@ -160,8 +160,13 @@ public class TTrainCourseTopicServiceImpl implements ITTrainCourseTopicService
courseTopic
.
setCreateTime
(
new
Date
());
topics
.
add
(
courseTopic
);
}
count
+=
topic
.
getQuan
();
}
//批量新增试题
return
tTrainCourseTopicMapper
.
batchInsertTTrainCourseTopic
(
topics
);
tTrainCourseTopicMapper
.
batchInsertTTrainCourseTopic
(
topics
);
//更新试题数量
TTrainCourse
course
=
tTrainCourseMapper
.
selectTTrainCourseById
(
batchTopicVo
.
getCourseId
());
course
.
setTopicNum
(
course
.
getTopicNum
()
+
count
);
return
tTrainCourseMapper
.
updateTTrainCourse
(
course
);
}
}
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