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
1861d417
Commit
1861d417
authored
Jan 13, 2020
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释
parent
ba6844dc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
BDiscussServiceImpl.java
...t/business/bdiscuss/service/impl/BDiscussServiceImpl.java
+9
-4
OfficeToPdf.java
src/main/java/org/rcisoft/core/util/OfficeToPdf.java
+3
-2
No files found.
src/main/java/org/rcisoft/business/bdiscuss/service/impl/BDiscussServiceImpl.java
View file @
1861d417
...
...
@@ -82,12 +82,13 @@ public class BDiscussServiceImpl implements BDiscussService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
PersistModel
save
(
CurUser
curUser
,
BDiscuss
bDiscuss
){
//
评论评论
List
<
BMessage
>
bMessageList
=
bMessageRepository
.
queryByNameAndCorp
(
"HFPL"
,
curUser
.
getCorpId
());
//
获取当前企业的评论通知权限
List
<
BMessage
>
bMessageList
=
bMessageRepository
.
queryByNameAndCorp
(
"HFPL"
,
curUser
.
getCorpId
());
//回复评论
BMessage
message
=
new
BMessage
();
if
(
bMessageList
!=
null
&&
bMessageList
.
size
()
>
0
){
message
=
bMessageList
.
get
(
0
);
}
//发送通知
if
(
StringUtils
.
isNotBlank
(
bDiscuss
.
getLevel
())
&&
"2"
.
equals
(
bDiscuss
.
getLevel
())
&&
"1"
.
equals
(
message
.
getFlag
())){
BNotice
bNotice
=
new
BNotice
();
if
(
StringUtils
.
isNotEmpty
(
bDiscuss
.
getReplyId
())){
...
...
@@ -107,12 +108,14 @@ public class BDiscussServiceImpl implements BDiscussService {
String
lessonType
=
LessonTypeEnum
.
LESSON
.
getCode
().
equals
(
bLesson
.
getLessonType
())
?
"线上课程"
:
"线下培训"
;
String
urlType
=
LessonTypeEnum
.
LESSON
.
getCode
().
equals
(
bLesson
.
getLessonType
())
?
UrlTypeEnum
.
LESSON
.
getName
()
:
UrlTypeEnum
.
TRAIN
.
getName
();
bNotice
.
setInfoText
(
sysUserServiceImpl
.
getNameById
(
bDiscuss
.
getStudentId
()).
getName
()
+
"回复了您在"
+
lessonType
+
"["
+
bLesson
.
getLessonName
()
+
"]的评论"
);
// 发消息
//
调用智学接口
发消息
// InfoTypeEnum.REPLY_DISCUSS.getvalue()
client
.
send
(
bNotice
,
InfoTypeEnum
.
REPLY_DISCUSS
.
getValue
(),
MessageEnum
.
HFPL
.
getName
(),
urlType
);
}
//评论课程
List
<
BMessage
>
bMessageListFBPL
=
bMessageRepository
.
queryByNameAndCorp
(
"FBPL"
,
curUser
.
getCorpId
());
List
<
BMessage
>
bMessageListFBPL
=
bMessageRepository
.
queryByNameAndCorp
(
"FBPL"
,
curUser
.
getCorpId
());
//发布评论
BMessage
messageFBPL
=
new
BMessage
();
if
(
bMessageListFBPL
!=
null
&&
bMessageListFBPL
.
size
()
>
0
){
messageFBPL
=
bMessageListFBPL
.
get
(
0
);
...
...
@@ -135,7 +138,9 @@ public class BDiscussServiceImpl implements BDiscussService {
}
//增加操作
UserUtil
.
setCurrentPersistOperation
(
bDiscuss
);
//将评论的数据添加到数据库
int
line
=
bDiscussRepository
.
insertSelective
(
bDiscuss
);
//重新统计b_lesson评论数
bLessonRepository
.
discussNumberReCount
(
bDiscuss
.
getLessonId
());
return
new
PersistModel
(
line
);
}
...
...
src/main/java/org/rcisoft/core/util/OfficeToPdf.java
View file @
1861d417
...
...
@@ -105,8 +105,7 @@ public class OfficeToPdf {
public
static
DocumentConverter
getConverter
(){
if
(
null
==
converter
){
LogUtil
.
fileChangeLog
(
"****************converter + begin***********"
+
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
converter
=
new
OpenOfficeDocumentConverter
(
connection
);
converter
=
new
OpenOfficeDocumentConverter
(
connection
);
LogUtil
.
fileChangeLog
(
"****************converter + end***********"
+
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
}
return
converter
;
...
...
@@ -151,10 +150,12 @@ public class OfficeToPdf {
DocumentFormatRegistry
factory
=
new
BasicDocumentFormatRegistry
();
LogUtil
.
fileChangeLog
(
"----------设置输入输出------------"
);
DocumentFormat
inputDocumentFormat
=
factory
.
getFormatByFileExtension
(
FileUtil
.
getFilePostfix
(
sourceFile
));
DocumentFormat
outputDocumentFormat
=
factory
.
getFormatByFileExtension
(
FileUtil
.
getFilePostfix
(
destFile
));
LogUtil
.
fileChangeLog
(
"开始转换--> "
+
sourceFile
);
executeConvert
(
inputFile
,
inputDocumentFormat
,
outputFile
,
outputDocumentFormat
);
LogUtil
.
fileChangeLog
(
"转换完毕--> "
+
destFile
);
...
...
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