Commit feb01cf9c5f7c4e4b83605d96c8add55a3f5948f
1 parent
31ec26f938
Exists in
master
修改定时发送推送是早上10点
Showing 3 changed files with 12 additions and 4 deletions
mainData/src/main/java/com/lymsh/yimiao/main/data/util/JPushUtil.java
View file @
feb01cf
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | import cn.jpush.api.push.model.Platform; |
4 | 4 | import cn.jpush.api.push.model.PushPayload; |
5 | 5 | import cn.jpush.api.push.model.audience.Audience; |
6 | +import cn.jpush.api.push.model.notification.IosNotification; | |
6 | 7 | import cn.jpush.api.push.model.notification.Notification; |
7 | 8 | import org.springframework.stereotype.Service; |
8 | 9 | |
... | ... | @@ -22,7 +23,13 @@ |
22 | 23 | return PushPayload.newBuilder() |
23 | 24 | .setPlatform(Platform.all()) |
24 | 25 | .setAudience(Audience.alias(alias)) |
25 | - .setNotification(Notification.alert(alert)) | |
26 | +// .setNotification(Notification.alert(alert)) | |
27 | + .setNotification(Notification.newBuilder() | |
28 | + .addPlatformNotification(IosNotification.newBuilder() | |
29 | + .setAlert(alert) | |
30 | + .setBadge(1) | |
31 | + .build()) | |
32 | + .build()) | |
26 | 33 | .build(); |
27 | 34 | } |
28 | 35 | } |
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/KidsController.java
View file @
feb01cf
webApi/src/main/resources/spring/applicationContext.xml
View file @
feb01cf
... | ... | @@ -100,9 +100,9 @@ |
100 | 100 | </bean> |
101 | 101 | |
102 | 102 | <!-- 定时发送接种消息 --> |
103 | - <!--<task:scheduled-tasks>--> | |
104 | - <!--<task:scheduled ref="pushTaskService" method="pushTask" cron="0 0 23 * * ?"/>--> | |
105 | - <!--</task:scheduled-tasks>--> | |
103 | + <task:scheduled-tasks> | |
104 | + <task:scheduled ref="pushTaskService" method="pushTask" cron="0 0 10 * * ?"/> | |
105 | + </task:scheduled-tasks> | |
106 | 106 | |
107 | 107 | |
108 | 108 |