admin
2018-12-25 4cb15e222cd7d099d533ccbeb7f9a8cd99bf180c
fanli/src/main/java/com/yeshi/fanli/service/impl/push/IOSPushServiceImpl.java
@@ -148,11 +148,6 @@
   }
   @Override
   public void pushWEEXUrl(Long uid, String weexUrl, String title, String content) throws PushException {
   }
   @Override
   public void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX) throws PushException {
      MessageInfo info = new MessageInfo();
      info.setPackageName(Constant.systemCommonConfig.getAndroidPackageName());
@@ -487,4 +482,52 @@
      }
   }
   @Override
   public void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException {
      MessageInfo info = new MessageInfo();
      info.setTitle(title);
      info.setContent(content);
      info.setDescription(content);
      // IOS 全推
      if (uid == null || uid == 0) {
         addPushIOSQueue(info, weexUrl, PushController.WEEX);
      } else {
         List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
         List<String> deviceTokenList = new ArrayList<>();
         if (deviceTokenIosList != null)
            for (DeviceTokenIOS ios : deviceTokenIosList) {
               deviceTokenList.add(ios.getDeviceToken());
            }
         try {
            IOSPushUtil.allPushIOS(deviceTokenList, info, weexUrl, PushController.WEEX);
         } catch (Exception e) {
            PushLogHelper.iosError(e);
         }
      }
   }
   @Override
   public void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException {
      MessageInfo info = new MessageInfo();
      info.setTitle(title);
      info.setContent(content);
      info.setDescription(content);
      // IOS 全推
      if (uid == null || uid == 0) {
         addPushIOSQueue(info, url, PushController.BAICHUAN);
      } else {
         List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
         List<String> deviceTokenList = new ArrayList<>();
         if (deviceTokenIosList != null)
            for (DeviceTokenIOS ios : deviceTokenIosList) {
               deviceTokenList.add(ios.getDeviceToken());
            }
         try {
            IOSPushUtil.allPushIOS(deviceTokenList, info, url, PushController.BAICHUAN);
         } catch (Exception e) {
            PushLogHelper.iosError(e);
         }
      }
   }
}