admin
2019-08-26 d28bed1a1275131a5ca37f7da37961e2b518ac07
fanli/src/main/java/com/yeshi/fanli/service/impl/push/XMPushServiceImpl.java
@@ -20,8 +20,9 @@
   @Async("pushExecutor")
   @Override
   public void pushGoods(Long uid, Long auctionId, String title, String content, String versions) throws PushException {
   public void pushGoods(Long uid, Long auctionId, String title, String content, String versions)
         throws PushException {
      String gid = auctionId + "";
      JSONObject json = new JSONObject();
      // json.put("url", "http://item.taobao.com/item.htm?id=" + gid);// IOS使用
@@ -29,12 +30,12 @@
      json.put("type", "goodsdetail");
      json.put("miPushUrl", String.format("%s.ui.recommend.GoodsBrowserActivity",
            Constant.systemCommonConfig.getAndroidBaseactivityName()));
      // 版本推送
      if (versions != null && versions.trim().length() > 0) {
         json.put("app_version", versions);
      }
      MessageInfo info = new MessageInfo();
      info.setTitle(title);
      info.setContent(content);
@@ -61,14 +62,14 @@
   @Async("pushExecutor")
   @Override
   public void pushUrl(Long uid, String url, String title, String content, String versions) throws PushException {
      JSONObject json = new JSONObject();
      json.put("url", url);
      json.put("type", "url");
      json.put("webUrl", url);
      json.put("miPushUrl", String.format("%s.ui.invite.ShareBrowserActivity",
            Constant.systemCommonConfig.getAndroidBaseactivityName()));
      // 版本推送
      if (versions != null && versions.trim().length() > 0) {
         json.put("app_version", versions);
@@ -101,7 +102,7 @@
   @Async("pushExecutor")
   @Override
   public void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX, String versions) throws PushException {
      MessageInfo info = new MessageInfo();
      info.setPackageName(Constant.systemCommonConfig.getAndroidPackageName());
@@ -123,14 +124,14 @@
         JSONObject json = new JSONObject();
         json.put("type", "ZNX");
         json.put("content", contentJson);
         json.put("miPushUrl", String.format("%s.ui.mine.AppMailDetailActivity",
         json.put("miPushUrl", String.format("%s.ui.main.MainActivity",
               Constant.systemCommonConfig.getAndroidBaseactivityName()));
         // 版本推送
         if (versions != null && versions.trim().length() > 0) {
            json.put("app_version", versions);
         }
         PushRecord pushRecord = new PushRecord();
         // 小米 全推
@@ -157,14 +158,14 @@
         JSONObject json = new JSONObject();
         json.put("type", "ZNX");
         json.put("content", contentJson);
         json.put("miPushUrl", String.format("%s.ui.mine.AppMailDetailActivity",
         json.put("miPushUrl", String.format("%s.ui.main.MainActivity",
               Constant.systemCommonConfig.getAndroidBaseactivityName()));
         // 版本推送
         if (versions != null && versions.trim().length() > 0) {
            json.put("app_version", versions);
         }
         // 小米 单推
         try {
            PushUtils.singlePushXiaoMi(info, json, pushRecord);
@@ -181,12 +182,12 @@
      JSONObject json = new JSONObject();
      json.put("url", weexUrl);
      json.put("type", "weex");
      // 版本推送
      if (versions != null && versions.trim().length() > 0) {
         json.put("app_version", versions);
      }
      MessageInfo info = new MessageInfo();
      info.setTitle(title);
      info.setContent(content);
@@ -211,11 +212,11 @@
      }
   }
   @Async("pushExecutor")
   @Override
   public void pushBaiChuanUrl(Long uid, String title, String content, String url, String versions) throws PushException {
   public void pushBaiChuanUrl(Long uid, String title, String content, String url, String versions)
         throws PushException {
      JSONObject json = new JSONObject();
      json.put("url", url);
      json.put("type", "baichuan");
@@ -223,7 +224,6 @@
      if (versions != null && versions.trim().length() > 0) {
         json.put("app_version", versions);
      }
      MessageInfo info = new MessageInfo();
      info.setTitle(title);
@@ -250,7 +250,7 @@
   @Async("pushExecutor")
   @Override
   public void pushWelfareCenter(Long uid, String title, String content, String versions) throws PushException {
      JSONObject json = new JSONObject();
      json.put("type", "welfare");
      json.put("miPushUrl", String.format("%s.ui.mine.WelfareCenterActivity",