From 3fc84b5d4b36ce9ab5cea84ee1b54942c8e04ef9 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 08 八月 2019 16:55:52 +0800 Subject: [PATCH] 拼多多短链修改 --- fanli/src/main/java/com/yeshi/fanli/service/impl/push/XMPushServiceImpl.java | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/XMPushServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/push/XMPushServiceImpl.java index 1dc1acb..b774784 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/push/XMPushServiceImpl.java +++ b/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", -- Gitblit v1.8.0