Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
push-message
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
liucheng
push-message
Commits
dda997ec
Commit
dda997ec
authored
Oct 27, 2020
by
lc@weface.com.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推送模板
parent
5815064b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
GeTuiSDK.java
src/main/java/com/weface/component/GeTuiSDK.java
+14
-3
application.yml
src/main/resources/application.yml
+1
-1
No files found.
src/main/java/com/weface/component/GeTuiSDK.java
View file @
dda997ec
...
@@ -14,6 +14,7 @@ import com.gexin.rp.sdk.http.Constants;
...
@@ -14,6 +14,7 @@ import com.gexin.rp.sdk.http.Constants;
import
com.gexin.rp.sdk.http.IGtPush
;
import
com.gexin.rp.sdk.http.IGtPush
;
import
com.gexin.rp.sdk.template.NotificationTemplate
;
import
com.gexin.rp.sdk.template.NotificationTemplate
;
import
com.gexin.rp.sdk.template.style.Style0
;
import
com.gexin.rp.sdk.template.style.Style0
;
import
com.gexin.rp.sdk.template.style.Style6
;
import
com.weface.dto.MsgDTO
;
import
com.weface.dto.MsgDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -74,7 +75,17 @@ public class GeTuiSDK {
...
@@ -74,7 +75,17 @@ public class GeTuiSDK {
template
.
setAppkey
(
appKey
);
template
.
setAppkey
(
appKey
);
Style0
style
=
new
Style0
();
Style0
style
=
new
Style0
();
// 设置通知栏标题与内容
Style6
style6
=
new
Style6
();
style6
.
setText
(
body
);
style6
.
setBigStyle2
(
body
);
style6
.
setLogo
(
"icon.png"
);
style6
.
setChannelLevel
(
4
);
style6
.
setTitle
(
title
);
style6
.
setRing
(
true
);
style6
.
setVibrate
(
true
);
style6
.
setClearable
(
true
);
/* // 设置通知栏标题与内容
style.setTitle(title);
style.setTitle(title);
style.setText(body);
style.setText(body);
// 配置通知栏图标
// 配置通知栏图标
...
@@ -87,8 +98,8 @@ public class GeTuiSDK {
...
@@ -87,8 +98,8 @@ public class GeTuiSDK {
style.setClearable(true);
style.setClearable(true);
//style.setChannel("通知渠道id");
//style.setChannel("通知渠道id");
//style.setChannelName("通知渠道名称");
//style.setChannelName("通知渠道名称");
style
.
setChannelLevel
(
3
);
//设置通知渠道重要性
style.setChannelLevel(3); //设置通知渠道重要性
*/
template
.
setStyle
(
style
);
template
.
setStyle
(
style
6
);
template
.
setTransmissionType
(
1
);
// 透传消息接受方式设置,1:立即启动APP,2:客户端收到消息后需要自行处理
template
.
setTransmissionType
(
1
);
// 透传消息接受方式设置,1:立即启动APP,2:客户端收到消息后需要自行处理
template
.
setTransmissionContent
(
"请输入您要透传的内容"
);
template
.
setTransmissionContent
(
"请输入您要透传的内容"
);
...
...
src/main/resources/application.yml
View file @
dda997ec
...
@@ -2,7 +2,7 @@ spring:
...
@@ -2,7 +2,7 @@ spring:
application
:
application
:
name
:
service-web
name
:
service-web
server
:
server
:
port
:
8080
port
:
9191
config
:
config
:
getui
:
getui
:
appkey
:
"
vIBAFNAEk88qekbfS3miE8"
appkey
:
"
vIBAFNAEk88qekbfS3miE8"
...
...
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