Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
da7aca93
Commit
da7aca93
authored
Dec 26, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
98b487ce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
JPushBiz.java
...c/main/java/com/xxfc/platform/universal/biz/JPushBiz.java
+9
-0
MailServiceBiz.java
.../java/com/xxfc/platform/universal/biz/MailServiceBiz.java
+1
-1
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/JPushBiz.java
View file @
da7aca93
...
...
@@ -43,6 +43,9 @@ public class JPushBiz extends BaseBiz<MessagePushMapper, MessagePush> {
@Value
(
"${universal.APP_KEY}"
)
private
String
APP_KEY
;
@Value
(
"${universal.DEBUG}"
)
private
boolean
debug
;
public
static
final
String
ALERT
=
"Test from API Example - alert"
;
//推送给所有平台设备
...
...
@@ -139,6 +142,7 @@ public class JPushBiz extends BaseBiz<MessagePushMapper, MessagePush> {
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"参数无效"
);
}
try
{
log
.
debug
(
"\n推送参数:"
+
payload
.
toJSON
());
PushResult
result
=
jpushClient
.
sendPush
(
payload
);
log
.
debug
(
"\n推送结果:"
+
result
);
return
ObjectRestResponse
.
succ
();
...
...
@@ -173,6 +177,11 @@ public class JPushBiz extends BaseBiz<MessagePushMapper, MessagePush> {
}
String
[]
userIdList
=
userIds
.
split
(
","
);
audience
=
Audience
.
alias
(
userIdList
);
}
else
{
if
(
debug
){
String
[]
userIdList
=
userIds
.
split
(
","
);
audience
=
Audience
.
alias
(
userIdList
);
}
}
JsonObject
intent
=
new
JsonObject
();
if
(
StringUtils
.
isNotBlank
(
messagePush
.
getIntent
())){
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/MailServiceBiz.java
View file @
da7aca93
...
...
@@ -15,7 +15,7 @@ import java.util.concurrent.Executors;
@Service
public
class
MailServiceBiz
{
@Autowired
//
@Autowired
JavaMailSender
mailSender
;
public
void
sendSimpleMail
(
String
to
,
String
subject
,
String
content
)
{
...
...
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