Commit feb01cf9c5f7c4e4b83605d96c8add55a3f5948f

Authored by landong2015
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
... ... @@ -350,6 +350,7 @@
350 350 if (data.getIoVaccineId().equals(records.getVaccineNameId())) {
351 351 if (records.getJiCi() < sum) {
352 352 jiCi = jiCi + records.getJiCi();
  353 + break;
353 354 }
354 355 }
355 356 }
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