From 5981b2cae7c20ec9021c8ccbe1a926f35f640210 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 03 一月 2019 17:43:18 +0800 Subject: [PATCH] Merge branch 'dev-hongbao' --- fanli/src/main/java/com/yeshi/fanli/service/impl/push/XMPushServiceImpl.java | 63 +++++++++++++++++++++++++++++-- 1 files changed, 58 insertions(+), 5 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 068c769..9974017 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 @@ -85,11 +85,6 @@ } @Override - public void pushWEEXUrl(Long uid, String weexUrl, String title, String content) throws PushException { - - } - - @Override public void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX) throws PushException { MessageInfo info = new MessageInfo(); @@ -154,4 +149,62 @@ } } + @Override + public void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException { + // TODO 鎺ㄩ�亀eex椤甸潰 + JSONObject json = new JSONObject(); + json.put("url", weexUrl); + json.put("type", "weex"); + 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.weex.WeexApplicationActivity", + 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); + } + } + + @Override + public void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException { + JSONObject json = new JSONObject(); + json.put("url", url); + json.put("type", "baichuan"); + MessageInfo info = new MessageInfo(); + info.setTitle(title); + info.setContent(content); + info.setDescription(content); + // 灏忕背鎺ㄩ�佺綉椤� + info.setPackageName(Constant.systemCommonConfig.getAndroidPackageName()); + + 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); + } + + } + } -- Gitblit v1.8.0