Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
push-platform-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d055ffbe
authored
Apr 13, 2021
by
fz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.添加请求日志
1 parent
a72f659c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
src/main/java/com/glsx/modules/notify/factory/strategy/AliYunStrategy.java
src/main/java/com/glsx/modules/notify/factory/strategy/YouMengStrategy.java
src/main/java/com/glsx/modules/notify/push/PushClient.java
src/main/java/com/glsx/modules/notify/service/CarHomePushService.java
src/main/java/com/glsx/modules/notify/factory/strategy/AliYunStrategy.java
View file @
d055ffb
...
@@ -38,6 +38,8 @@ public class AliYunStrategy implements PushStrategy {
...
@@ -38,6 +38,8 @@ public class AliYunStrategy implements PushStrategy {
//设置按照别名推送
//设置按照别名推送
request
.
setTarget
(
"ALIAS"
);
request
.
setTarget
(
"ALIAS"
);
log
.
info
(
"aliyun_notify_request====="
+
request
);
PushResponse
pushResponse
=
null
;
PushResponse
pushResponse
=
null
;
//iOS:iOS设备
//iOS:iOS设备
//ANDROID:Android设备
//ANDROID:Android设备
...
@@ -54,7 +56,9 @@ public class AliYunStrategy implements PushStrategy {
...
@@ -54,7 +56,9 @@ public class AliYunStrategy implements PushStrategy {
Map
<
String
,
Object
>
map
=
new
HashMap
();
Map
<
String
,
Object
>
map
=
new
HashMap
();
map
.
put
(
"msg_id"
,
pushResponse
.
getMessageId
());
map
.
put
(
"msg_id"
,
pushResponse
.
getMessageId
());
return
R
.
ok
().
data
(
map
);
R
res
=
R
.
ok
().
data
(
map
);
log
.
info
(
"aliyun_notify_result====="
+
res
);
return
R
.
ok
().
data
(
res
);
}
}
...
...
src/main/java/com/glsx/modules/notify/factory/strategy/YouMengStrategy.java
View file @
d055ffb
...
@@ -23,6 +23,7 @@ public class YouMengStrategy implements PushStrategy {
...
@@ -23,6 +23,7 @@ public class YouMengStrategy implements PushStrategy {
return
R
.
error
(
"终端类型DeviceType不能为空"
);
return
R
.
error
(
"终端类型DeviceType不能为空"
);
}
}
log
.
info
(
"youmeng_notify_request====="
+
request
);
//iOS:iOS设备
//iOS:iOS设备
//ANDROID:Android设备
//ANDROID:Android设备
if
(
deviceType
.
equals
(
"ANDROID"
))
{
if
(
deviceType
.
equals
(
"ANDROID"
))
{
...
...
src/main/java/com/glsx/modules/notify/push/PushClient.java
View file @
d055ffb
...
@@ -128,9 +128,10 @@ public class PushClient {
...
@@ -128,9 +128,10 @@ public class PushClient {
log
.
error
(
"友盟fail===errorCode:"
+
errorCode
+
"===errorMsg:"
+
errorMsg
);
log
.
error
(
"友盟fail===errorCode:"
+
errorCode
+
"===errorMsg:"
+
errorMsg
);
return
R
.
error
(
errorCode
,
errorMsg
);
return
R
.
error
(
errorCode
,
errorMsg
);
}
}
Map
<
String
,
Object
>
map
=
new
HashMap
();
Map
<
String
,
Object
>
map
=
new
HashMap
();
map
.
put
(
"msg_id"
,
data
.
get
(
"msg_id"
));
map
.
put
(
"msg_id"
,
data
.
get
(
"msg_id"
));
return
R
.
ok
().
data
(
map
);
R
res
=
R
.
ok
().
data
(
map
);
log
.
info
(
"youmeng_notify_result====="
+
res
);
return
res
;
}
}
}
}
src/main/java/com/glsx/modules/notify/service/CarHomePushService.java
View file @
d055ffb
...
@@ -89,7 +89,6 @@ public class CarHomePushService extends PushService{
...
@@ -89,7 +89,6 @@ public class CarHomePushService extends PushService{
pushRequest
.
setAppMasterSecret
(
appMasterSecret_android_youmeng
);
pushRequest
.
setAppMasterSecret
(
appMasterSecret_android_youmeng
);
//环境
//环境
pushRequest
.
setTestMode
(
testMode
);
pushRequest
.
setTestMode
(
testMode
);
log
.
info
(
"setAliasType====="
+
aliasType_android_youmeng
);
//AliasType
//AliasType
pushRequest
.
setAliasType
(
aliasType_android_youmeng
);
pushRequest
.
setAliasType
(
aliasType_android_youmeng
);
//通知跳转
//通知跳转
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment