Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
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
李丛阳
education
Commits
d01b1e29
Commit
d01b1e29
authored
Jul 02, 2020
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增lessonlog构造
parent
75b016ff
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
BLessonLog.java
...va/org/rcisoft/business/blessonlog/entity/BLessonLog.java
+6
-0
BMessageServiceImpl.java
...t/business/bmessage/service/impl/BMessageServiceImpl.java
+1
-5
No files found.
src/main/java/org/rcisoft/business/blessonlog/entity/BLessonLog.java
View file @
d01b1e29
...
...
@@ -3,6 +3,7 @@ package org.rcisoft.business.blessonlog.entity;
import
lombok.*
;
import
org.rcisoft.core.entity.IdEntity
;
import
org.rcisoft.core.util.UserUtil
;
import
javax.persistence.*
;
...
...
@@ -33,5 +34,10 @@ public class BLessonLog extends IdEntity<BLessonLog> {
private
String
lessonId
;
public
static
BLessonLog
generate
(
String
content
,
String
lessonId
){
BLessonLog
bLessonLog
=
new
BLessonLog
(
content
,
lessonId
);
UserUtil
.
setCurrentPersistOperation
(
bLessonLog
);
return
bLessonLog
;
}
}
src/main/java/org/rcisoft/business/bmessage/service/impl/BMessageServiceImpl.java
View file @
d01b1e29
...
...
@@ -8,7 +8,6 @@ import org.rcisoft.business.bfile.dao.BPFileRepository;
import
org.rcisoft.business.bfile.entity.BFile
;
import
org.rcisoft.business.blesson.dao.BLessonRepository
;
import
org.rcisoft.business.blesson.dao.BPLessonRepository
;
import
org.rcisoft.business.blesson.dto.LessonAllDTO
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.enums.ReleaseStateEnum
;
import
org.rcisoft.business.blessonlog.dao.BLessonLogRepository
;
...
...
@@ -148,10 +147,7 @@ public class BMessageServiceImpl implements BMessageService {
List
<
BLessonLog
>
list
=
new
ArrayList
<>();
//将操作日志添加到每一个课程
for
(
BLesson
lesson
:
lessons
){
BLessonLog
log
=
new
BLessonLog
();
UserUtil
.
setCurrentPersistOperation
(
log
);
log
.
setContent
(
"1"
.
equals
(
bMessage
.
getTimeValue
())?
"开启共享"
:
"关闭共享"
);
log
.
setLessonId
(
lesson
.
getBusinessId
());
BLessonLog
log
=
BLessonLog
.
generate
(
"1"
.
equals
(
bMessage
.
getTimeValue
())?
"开启共享"
:
"关闭共享"
,
lesson
.
getBusinessId
());
list
.
add
(
log
);
}
bLessonLogRepository
.
insertList
(
list
);
...
...
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