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
f9fa00de
Commit
f9fa00de
authored
Sep 09, 2021
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改消息参数传递
parent
4b258a54
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
46 deletions
+17
-46
MessageServiceImpl.java
...amos/patrol/business/service/impl/MessageServiceImpl.java
+3
-3
AsyncTask.java
...in/java/com/yeejoin/amos/patrol/core/async/AsyncTask.java
+2
-31
AppMessagePushService.java
.../com/yeejoin/amos/patrol/jpush/AppMessagePushService.java
+12
-12
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 @
f9fa00de
...
...
@@ -231,8 +231,8 @@ public class MessageServiceImpl implements IMessageService {
}
List
<
String
>
pushApps
=
jpushUser
.
stream
()
.
filter
(
bo
->
StringUtil
.
isNotEmpty
(
bo
.
getUser
name
()))
.
map
(
PushTargetBo:
:
getUser
name
).
collect
(
Collectors
.
toList
());
.
filter
(
bo
->
StringUtil
.
isNotEmpty
(
bo
.
getUser
Id
()))
.
map
(
PushTargetBo:
:
getUser
Id
).
collect
(
Collectors
.
toList
());
pushApps
=
pushApps
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
if
(!
pushApps
.
isEmpty
()){
List
<
PushMsgParam
>
pmps
=
new
ArrayList
<
PushMsgParam
>();
...
...
@@ -314,7 +314,7 @@ public class MessageServiceImpl implements IMessageService {
public
Msg
pushMsgAndSave
(
String
toke
,
String
product
,
String
appKey
,
Msg
msg
)
{
List
<
PushMsgParam
>
pmps
=
new
ArrayList
<
PushMsgParam
>();
PushMsgParam
pushMsg
=
new
PushMsgParam
();
pushMsg
.
setRecivers
(
Arrays
.
asList
(
msg
.
get
TargetTel
()));
pushMsg
.
setRecivers
(
Arrays
.
asList
(
msg
.
get
UserId
()));
pushMsg
.
setContent
(
ObjectUtils
.
isEmpty
(
msg
.
getPushBody
())
?
msg
.
getBody
()
:
msg
.
getPushBody
());
pushMsg
.
setSubject
(
msg
.
getTitle
());
pushMsg
.
setType
(
JPushTypeEnum
.
ALIAS
.
getCode
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/core/async/AsyncTask.java
View file @
f9fa00de
...
...
@@ -66,37 +66,7 @@ public class AsyncTask {
private
static
final
String
TAB
=
"\r\n"
;
/**
* 邮件发送
* @param msgResponse
* @return
* @throws InterruptedException
*/
// @Async("asyncTaskExecutor")
// public Future<Boolean> sendEmail(PushMsgParam pmp) throws InterruptedException {
// long start = System.currentTimeMillis();
// iEmailService.sendSimpleEmail(pmp.getEmails(), pmp.getSubject(), pmp.getContent());
// long end = System.currentTimeMillis();
// log.info("=====邮件发送耗时:"+(end-start)+"======");
// return new AsyncResult<Boolean>(true);
// }
//
// /**
// * jpush 推送
// * @param pmps
// * @return
// * @throws InterruptedException
// */
// @Async("asyncTaskExecutor")
// public Future<Boolean> sendJpush(List<PushMsgParam> pmps) throws InterruptedException {
// long start = System.currentTimeMillis();
// appMessagePushService.sendMessage(pmps);
// long end = System.currentTimeMillis();
// //返回true,告诉此任务已完成
// log.info("=====Jpush发送耗时:"+(end-start)+"======");
// return new AsyncResult<Boolean>(true);
// }
/**
* 检查消息推送
* @param checkId
...
...
@@ -231,6 +201,7 @@ public class AsyncTask {
msg
.
setIsImmediately
(
true
);
msg
.
setSendTime
(
date
);
msg
.
setCreateDate
(
date
);
msg
.
setTargetTel
(
user
.
getString
(
"username"
));
msg
.
setReciverName
(
user
.
getString
(
"realName"
));
sendUserIds
.
add
(
user
.
getString
(
"userId"
));
msgs
.
add
(
msg
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/jpush/AppMessagePushService.java
View file @
f9fa00de
...
...
@@ -110,17 +110,17 @@ public class AppMessagePushService {
}
public
void
sendMessage
(
PushMsgParam
response
){
try
{
if
(
null
!=
response
&&
"true"
.
equals
(
isPush
)){
CommonResponse
commonResponse
=
PushFeign
.
sendMessageone
(
response
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
e
.
printStackTrace
();
}
}
//
public void sendMessage(PushMsgParam response){
//
//
try {
//
if(null!=response && "true".equals(isPush)){
//
CommonResponse commonResponse = PushFeign.sendMessageone(response);
//
}
//
} catch (Exception e) {
//
log.error(e.getMessage(),e);
//
e.printStackTrace();
//
//
}
//
}
}
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