yj
2020-03-06 207dc8655711cddac2653e18b51e58a88dba2084
fanli/src/main/java/com/yeshi/fanli/util/push/PushUtils.java
@@ -66,6 +66,9 @@
       * Constant.systemCommonConfig.getIosBundleId());
       */
      if (Constant.IS_TEST)
         return 1;
      String IOS = IOSPushUtil.allPushIOS(deviceTokenList, info, url, type);
      LogHelper.userInfo("IOS的推送日志:" + IOS);
      pushRecord.setIosPushId(IOS);
@@ -102,6 +105,27 @@
      }
   }
   public static int singlePushXiaoMiByRegisterId(MessageInfo info, JSONObject json, PushRecord pushRecord,
         String regId) {
      if (Constant.IS_TEST)
         return 1;
      JSONObject mapXm = JSONObject.fromObject(json);
      List<String> regIdList = new ArrayList<>();
      regIdList.add(regId);
      String android = XiaoMiPushUtil.pushBatchAndroidForXM(info, mapXm, regIdList);
      LogHelper.userInfo("安卓推送测试:" + android);
      pushRecord.setAndroidPushId(android);
      if (android != null) {
         return 1;
      } else {
         return 4;
      }
   }
   /**
    * IOS 单推
    * 
@@ -113,6 +137,8 @@
    */
   public static String singlePushIOS(MessageInfo info, PushRecord pushRecord, String url, int type,
         List<String> deviceTokenList) {
      if (Constant.IS_TEST)
         return null;
      if (deviceTokenList != null && deviceTokenList.size() > 0) {
         for (String deviceToken : deviceTokenList) {
            if (!StringUtil.isNullOrEmpty(deviceToken)) {