admin
2019-08-26 81187837de78e62a5e3a38afda8b8553dcd2203c
fanli/src/main/java/com/yeshi/fanli/service/impl/push/HWPushServiceImpl.java
@@ -142,10 +142,16 @@
    * @param webUrl
    * @param versionCodeList
    */
   private void push(PushTypeEnum type, Long uid, String title, String content, String url, String webUrl, Long goodsId,
         List<Integer> versionCodeList) throws PushException {
   private void push(PushTypeEnum type, Long uid, String title, String content, String url, String webUrl,
         Long goodsId, List<Integer> versionCodeList) throws PushException {
      int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
      List<Integer> newVersionList = getVersionCodeList(versionCodeList);
      // 1.6.5后开始推送
      for (int i = 0; i < newVersionList.size(); i++) {
         if (newVersionList.get(i) < 47)
            newVersionList.remove(i--);
      }
      if (uid == null || uid == 0) {
         long deviceCount = deviceTokenHWService.countDeviceToken(newVersionList);
         int page = (int) (deviceCount % 100 == 0 ? deviceCount / 100 : deviceCount / 100 + 1);