Commit dda997ec authored by lc@weface.com.cn's avatar lc@weface.com.cn

推送模板

parent 5815064b
......@@ -14,6 +14,7 @@ import com.gexin.rp.sdk.http.Constants;
import com.gexin.rp.sdk.http.IGtPush;
import com.gexin.rp.sdk.template.NotificationTemplate;
import com.gexin.rp.sdk.template.style.Style0;
import com.gexin.rp.sdk.template.style.Style6;
import com.weface.dto.MsgDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
......@@ -74,7 +75,17 @@ public class GeTuiSDK {
template.setAppkey(appKey);
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.setText(body);
// 配置通知栏图标
......@@ -87,8 +98,8 @@ public class GeTuiSDK {
style.setClearable(true);
//style.setChannel("通知渠道id");
//style.setChannelName("通知渠道名称");
style.setChannelLevel(3); //设置通知渠道重要性
template.setStyle(style);
style.setChannelLevel(3); //设置通知渠道重要性*/
template.setStyle(style6);
template.setTransmissionType(1); // 透传消息接受方式设置,1:立即启动APP,2:客户端收到消息后需要自行处理
template.setTransmissionContent("请输入您要透传的内容");
......
......@@ -2,7 +2,7 @@ spring:
application:
name: service-web
server:
port: 8080
port: 9191
config:
getui:
appkey: "vIBAFNAEk88qekbfS3miE8"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment