-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd4896a
commit 04204ee
Showing
13 changed files
with
236 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
spring: | ||
application: | ||
name: jiguang-sdk | ||
|
||
server: | ||
port: 9876 | ||
|
||
logging: | ||
level: | ||
root: debug | ||
|
||
jiguang: | ||
api: | ||
# 此为演示数据,请替换成真实数据 | ||
app-key: a266cd5c8544ba09b23733e1 | ||
master-secret: bcf3b3327000abce4764f862 | ||
dev-key: c2dc75e97486529205528b23 | ||
dev-secret: d219e2f001df2fe4f08b6754 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
jiguang-sdk/src/main/java/cn/jiguang/sdk/bean/push/callback/Callback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package cn.jiguang.sdk.bean.push.callback; | ||
|
||
import cn.jiguang.sdk.enums.callback.CallbackType; | ||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import java.util.Map; | ||
|
||
@Data | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class Callback { | ||
|
||
@JsonProperty("url") | ||
private String url; | ||
|
||
/** | ||
* 取值参考:{@link CallbackType} | ||
*/ | ||
@JsonProperty("type") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private Integer type; | ||
|
||
@JsonProperty("params") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private Map<String, Object> params; | ||
|
||
} |
64 changes: 64 additions & 0 deletions
64
...src/main/java/cn/jiguang/sdk/bean/push/message/notification/ThirdNotificationMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package cn.jiguang.sdk.bean.push.message.notification; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import java.util.Map; | ||
|
||
@Data | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class ThirdNotificationMessage { | ||
|
||
@JsonProperty("title") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private String title; | ||
|
||
@JsonProperty("content") | ||
private String content; | ||
|
||
@JsonProperty("intent") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private Intent intent; | ||
|
||
@JsonProperty("uri_activity") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private String uriActivity; | ||
|
||
@JsonProperty("uri_action") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private String uriAction; | ||
|
||
@JsonProperty("badge_class") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private String badgeClass; | ||
|
||
@JsonProperty("badge_add_num") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private Integer badgeAddNumber; | ||
|
||
@JsonProperty("badge_set_num") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private Integer badgeSetNumber; | ||
|
||
@JsonProperty("sound") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private String sound; | ||
|
||
@JsonProperty("channel_id") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private String channelId; | ||
|
||
@JsonProperty("extras") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private Map<String, Object> extras; | ||
|
||
@Data | ||
public static class Intent { | ||
@JsonProperty("url") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private String url; | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
jiguang-sdk/src/main/java/cn/jiguang/sdk/bean/push/message/sms/SmsMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package cn.jiguang.sdk.bean.push.message.sms; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import java.util.Map; | ||
|
||
@Data | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class SmsMessage { | ||
|
||
@JsonProperty("temp_id") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private Integer tempId; | ||
|
||
@JsonProperty("signid") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private Integer signId; | ||
|
||
@JsonProperty("delay_time") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private Integer delayTime; | ||
|
||
@JsonProperty("active_filter") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private Boolean activeFilter; | ||
|
||
@JsonProperty("temp_para") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private Map<String, Object> tempParams; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
jiguang-sdk/src/main/java/cn/jiguang/sdk/enums/callback/CallbackType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cn.jiguang.sdk.enums.callback; | ||
|
||
public enum CallbackType { | ||
|
||
RECEIVED(0b1, "送达回执,值为1"), | ||
CLICKED(0b10, "点击回执,值为2"), | ||
RECEIVED_AND_CLICKED(0b11, "送达和点击回执,值为3"), | ||
PUSH(0b1000, "推送成功回执,值为8"), | ||
PUSH_AND_RECEIVED(0b1001, "推送成功和送达回执,值为9"), | ||
PUSH_AND_CLICKED(0b1010, "推送成功和点击回执,值为10"), | ||
PUSH_AND_RECEIVED_AND_CLICKED(0b1011, "推送成功和送达和点击回执,值为11"), | ||
; | ||
|
||
private int value; | ||
private String description; | ||
|
||
CallbackType(int value, String description) { | ||
this.value = value; | ||
this.description = description; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters