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
9ff2df61
Commit
9ff2df61
authored
Dec 18, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打开通知
parent
1d10e803
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
68 deletions
+65
-68
BDiscussServiceImpl.java
...t/business/bdiscuss/service/impl/BDiscussServiceImpl.java
+40
-40
SendNoticeServiceImpl.java
.../business/blesson/service/impl/SendNoticeServiceImpl.java
+17
-22
MTNotificationApiRequestClient.java
...common/util/outClient/MTNotificationApiRequestClient.java
+3
-1
messageTask.java
src/main/java/org/rcisoft/core/task/messageTask.java
+5
-5
No files found.
src/main/java/org/rcisoft/business/bdiscuss/service/impl/BDiscussServiceImpl.java
View file @
9ff2df61
...
...
@@ -89,7 +89,7 @@ public class BDiscussServiceImpl implements BDiscussService {
message
=
bMessageList
.
get
(
0
);
}
if
(
StringUtils
.
isBlank
(
bDiscuss
.
getLevel
())
&&
"2"
.
equals
(
bDiscuss
.
getLevel
())
&&
"1"
.
equals
(
message
.
getFlag
())){
try
{
//
try{
BNotice
bNotice
=
new
BNotice
();
if
(
StringUtils
.
isNotEmpty
(
bDiscuss
.
getReplyId
())){
BDiscuss
bDiscussStu
=
bDiscussRepository
.
selectByPrimaryKey
(
bDiscuss
.
getReplyId
());
...
...
@@ -110,9 +110,9 @@ public class BDiscussServiceImpl implements BDiscussService {
bNotice
.
setInfoText
(
sysUserServiceImpl
.
getNameById
(
bDiscuss
.
getStudentId
()).
getName
()
+
"回复了您在"
+
lessonType
+
"["
+
bLesson
.
getLessonName
()
+
"]的评论"
);
// 发消息
client
.
send
(
bNotice
,
InfoTypeEnum
.
REPLY_DISCUSS
.
getLable
(),
MessageEnum
.
HFPL
.
getName
(),
urlType
);
}
catch
(
Exception
e
){
log
.
info
(
"发送通知失败,"
+
e
);
}
//
}catch (Exception e){
//
log.info("发送通知失败,"+e);
//
}
}
//评论课程
List
<
BMessage
>
bMessageListFBPL
=
bMessageRepository
.
queryByNameAndCorp
(
"FBPL"
,
curUser
.
getCorpId
());
...
...
@@ -121,7 +121,7 @@ public class BDiscussServiceImpl implements BDiscussService {
messageFBPL
=
bMessageListFBPL
.
get
(
0
);
}
if
(
StringUtils
.
isBlank
(
bDiscuss
.
getLevel
())
&&
"1"
.
equals
(
bDiscuss
.
getLevel
())
&&
"1"
.
equals
(
messageFBPL
.
getFlag
())){
try
{
//
try {
BNotice
bNotice
=
new
BNotice
();
bNotice
.
setInfoType
(
InfoTypeEnum
.
REPLY_DISCUSS
.
getValue
());
bNotice
.
setLessonId
(
bDiscuss
.
getLessonId
());
...
...
@@ -135,9 +135,9 @@ public class BDiscussServiceImpl implements BDiscussService {
bNotice
.
setInfoText
(
sysUserServiceImpl
.
getNameById
(
bDiscuss
.
getStudentId
()).
getName
()
+
"评论了您主讲的"
+
lessonType
+
"\""
+
bLesson
.
getLessonName
()+
"\""
);
// 发消息
client
.
send
(
bNotice
,
InfoTypeEnum
.
REPLY_DISCUSS
.
getLable
(),
MessageEnum
.
FBPL
.
getName
(),
urlType
);
}
catch
(
Exception
e
){
log
.
info
(
"发送通知失败,"
+
e
);
}
//
}catch (Exception e){
//
log.info("发送通知失败,"+e);
//
}
}
//增加操作
UserUtil
.
setCurrentPersistOperation
(
bDiscuss
);
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/SendNoticeServiceImpl.java
View file @
9ff2df61
...
...
@@ -37,11 +37,6 @@ public class SendNoticeServiceImpl implements SendNoticeService {
@Override
public
void
sendAppointNotice
(
BLesson
bLesson
,
AppointLessonDTO
appointLessonDTO
,
List
<
String
>
userIds
)
{
// try {
// Thread.sleep(10000);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
//是否去掉已在切已指派的人员
String
type
=
LessonTypeEnum
.
LESSON
.
getCode
().
equals
(
bLesson
.
getLessonType
())
?
MessageEnum
.
ZPKC
.
getName
()
:
MessageEnum
.
ZPPX
.
getName
();
List
<
BMessage
>
bMessageList
=
bMessageRepository
.
queryByNameAndCorp
(
type
,
appointLessonDTO
.
getCorpId
());
...
...
@@ -50,7 +45,7 @@ public class SendNoticeServiceImpl implements SendNoticeService {
message
=
bMessageList
.
get
(
0
);
}
if
(
userIds
!=
null
&&
userIds
.
size
()
>
0
&&
message
!=
null
&&
"1"
.
equals
(
message
.
getFlag
())){
try
{
//
try{
BNotice
bNotice
=
new
BNotice
();
bNotice
.
setRecipientIds
(
userIds
);
bNotice
.
setLessonId
(
bLesson
.
getBusinessId
());
...
...
@@ -64,9 +59,9 @@ public class SendNoticeServiceImpl implements SendNoticeService {
bNotice
.
setInfoText
(
sysUserServiceImpl
.
getNameById
(
appointLessonDTO
.
getUserId
()).
getName
()
+
"给您指派了"
+
lessonType
+
"“"
+
bLesson
.
getLessonName
()
+
"”,请及时学习"
);
// 往智信平台发啊消息
client
.
send
(
bNotice
,
InfoTypeEnum
.
REPLY_DISCUSS
.
getLable
(),
type
,
urlType
);
}
catch
(
Exception
e
){
log
.
info
(
"发送通知失败,"
+
e
);
}
//
}catch (Exception e){
//
log.info("发送通知失败,"+e);
//
}
}
}
}
src/main/java/org/rcisoft/common/util/outClient/MTNotificationApiRequestClient.java
View file @
9ff2df61
...
...
@@ -85,7 +85,7 @@ public class MTNotificationApiRequestClient {
* @return
*/
public
boolean
send
(
BNotice
message
,
String
noticeTitle
,
String
type
,
String
urlType
)
{
if
(
true
)
{
if
(
"dev"
.
equalsIgnoreCase
(
serverType
)
)
{
return
true
;
}
NotiRet
ret
=
new
NotiRet
();
...
...
@@ -131,6 +131,8 @@ public class MTNotificationApiRequestClient {
});
HaveJurisdictionReqDTO
haveJurisdictionReqDTO
=
new
HaveJurisdictionReqDTO
(
Long
.
parseLong
(
message
.
getCorpId
()),
recipientIdLongList
);
Ret
haveJurisList
=
microappApiRequestClient
.
haveJurisdictionUserFast
(
haveJurisdictionReqDTO
);
log
.
info
(
"----------------------通知-权限验证返回结果----------------------"
+
haveJurisList
);
List
<
String
>
haveJurisAccountIds
=
new
ArrayList
<>();
List
<
String
>
getUserAccountList
=
new
ArrayList
<>();
...
...
src/main/java/org/rcisoft/core/task/messageTask.java
View file @
9ff2df61
...
...
@@ -76,11 +76,11 @@ public class messageTask {
// 通知信息
bNotice
.
setInfoText
(
"“"
+
bLesson
.
getLessonName
()+
"”线下培训即将开始"
);
// 往智信平台发啊消息
try
{
//
try {
client
.
send
(
bNotice
,
InfoTypeEnum
.
REPLY_DISCUSS
.
getLable
(),
MessageEnum
.
PXJJKS
.
getName
(),
UrlTypeEnum
.
TRAIN
.
getName
());
}
catch
(
Exception
e
){
log
.
info
(
"发送通知失败,"
+
e
);
}
//
}catch (Exception e){
//
log.info("发送通知失败,"+e);
//
}
});
}
}
...
...
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