admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
fanli/src/main/java/com/yeshi/fanli/util/push/PushUtils.java
@@ -87,13 +87,34 @@
    * @param json
    * @return
    */
   public static int singlePushXiaoMi(MessageInfo info, JSONObject json, PushRecord pushRecord) {
   public static int singlePushXiaoMi(MessageInfo info, JSONObject json,List<String> regIds, PushRecord pushRecord) {
//      if (Constant.IS_TEST)
//         return 1;
      JSONObject mapXm = JSONObject.fromObject(json);
      String android = XiaoMiPushUtil.singlePushAndroidForXM(info, mapXm,regIds, null);
      LogHelper.userInfo("安卓推送测试:" + android);
      pushRecord.setAndroidPushId(android);
      if (android != null) {
         return 1;
      } else {
         return 4;
      }
   }
   public static int singlePushXiaoMiByRegisterId(MessageInfo info, JSONObject json, PushRecord pushRecord,
         String regId) {
      if (Constant.IS_TEST)
         return 1;
      JSONObject mapXm = JSONObject.fromObject(json);
      String android = XiaoMiPushUtil.singlePushAndroidForXM(info, mapXm, null);
      List<String> regIdList = new ArrayList<>();
      regIdList.add(regId);
      String android = XiaoMiPushUtil.pushBatchAndroidForXM(info, mapXm, regIdList);
      LogHelper.userInfo("安卓推送测试:" + android);
      pushRecord.setAndroidPushId(android);