Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
7d2513a2
Commit
7d2513a2
authored
Dec 10, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步代码
parent
9aef28a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
MessageServiceImpl.java
...amos/patrol/business/service/impl/MessageServiceImpl.java
+10
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/MessageServiceImpl.java
View file @
7d2513a2
...
@@ -65,6 +65,7 @@ import com.yeejoin.amos.patrol.email.IEmailService;
...
@@ -65,6 +65,7 @@ import com.yeejoin.amos.patrol.email.IEmailService;
import
com.yeejoin.amos.patrol.feign.PushFeignServer
;
import
com.yeejoin.amos.patrol.feign.PushFeignServer
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.patrol.jpush.AppMessagePushService
;
import
com.yeejoin.amos.patrol.jpush.AppMessagePushService
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
@@ -324,7 +325,13 @@ public class MessageServiceImpl implements IMessageService {
...
@@ -324,7 +325,13 @@ public class MessageServiceImpl implements IMessageService {
@Override
@Override
public
Msg
pushMsgAndSave
(
String
toke
,
String
product
,
String
appKey
,
Msg
msg
)
{
public
Msg
pushMsgAndSave
(
String
toke
,
String
product
,
String
appKey
,
Msg
msg
)
{
List
<
PushMsgParam
>
pmps
=
new
ArrayList
<
PushMsgParam
>();
//List<PushMsgParam> pmps = new ArrayList<PushMsgParam>();
if
(
toke
!=
null
){
RequestContext
.
setToken
(
toke
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setAppKey
(
appKey
);
}
PushMsgParam
pushMsg
=
new
PushMsgParam
();
PushMsgParam
pushMsg
=
new
PushMsgParam
();
pushMsg
.
setRecivers
(
Arrays
.
asList
(
msg
.
getUserId
()));
pushMsg
.
setRecivers
(
Arrays
.
asList
(
msg
.
getUserId
()));
pushMsg
.
setContent
(
ObjectUtils
.
isEmpty
(
msg
.
getPushBody
())
?
msg
.
getBody
()
:
msg
.
getPushBody
());
pushMsg
.
setContent
(
ObjectUtils
.
isEmpty
(
msg
.
getPushBody
())
?
msg
.
getBody
()
:
msg
.
getPushBody
());
...
@@ -335,10 +342,10 @@ public class MessageServiceImpl implements IMessageService {
...
@@ -335,10 +342,10 @@ public class MessageServiceImpl implements IMessageService {
extras
.
put
(
"type"
,
msg
.
getMsgType
());
extras
.
put
(
"type"
,
msg
.
getMsgType
());
extras
.
put
(
"id"
,
msg
.
getRelationId
()==
null
?
"0"
:
msg
.
getRelationId
().
toString
());
extras
.
put
(
"id"
,
msg
.
getRelationId
()==
null
?
"0"
:
msg
.
getRelationId
().
toString
());
pushMsg
.
setExtras
(
extras
);
pushMsg
.
setExtras
(
extras
);
pmps
.
add
(
pushMsg
);
//
pmps.add(pushMsg);
msg
.
setSendTime
(
new
Date
());
msg
.
setSendTime
(
new
Date
());
msg
.
setStatus
(
1
);
msg
.
setStatus
(
1
);
pushFeignServer
.
sendMessage
(
p
mps
);
pushFeignServer
.
sendMessage
(
p
ushMsg
);
iMsgDao
.
save
(
msg
);
iMsgDao
.
save
(
msg
);
return
msg
;
return
msg
;
}
}
...
...
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