yujian
2019-03-06 a6673284d4ec0b7c11079c65d940c9443d86d11e
fanli/src/main/java/com/yeshi/fanli/service/impl/push/XMPushServiceImpl.java
@@ -236,4 +236,35 @@
   }
   @Override
   public void pushWelfareCenter(Long uid, String title, String content) throws PushException {
      JSONObject json = new JSONObject();
      json.put("type", "welfare");
      json.put("miPushUrl", String.format("%s.ui.mine.WelfareCenterActivity",
            Constant.systemCommonConfig.getAndroidBaseactivityName()));
      MessageInfo info = new MessageInfo();
      info.setTitle(title);
      info.setContent(content);
      info.setDescription(content);
      // 小米推送网页
      info.setPackageName(Constant.systemCommonConfig.getAndroidPackageName());
      info.setActivty(String.format("%s.ui.mine.WelfareCenterActivity",
            Constant.systemCommonConfig.getAndroidBaseactivityName()));
      PushRecord pushRecord = new PushRecord();
      // 小米 全推
      if (uid == null || uid == 0) {
         try {
            PushUtils.allPushXiaoMi(info, json, pushRecord);
         } catch (Exception e) {
            PushLogHelper.xmError(e);
         }
      } else {
         info.setAlias(uid + "");
         PushUtils.singlePushXiaoMi(info, json, pushRecord);
      }
   }
}