From ca20ce6afc5abe164767c87b5332df223c3b8063 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 05 三月 2019 15:31:31 +0800 Subject: [PATCH] 增加福利中心推送 二维码识别邀请关系修改 --- fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java | 55 ++++++++++++++++++++++++++----------------------------- 1 files changed, 26 insertions(+), 29 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java index 84a5dbc..b2ee013 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java @@ -36,6 +36,7 @@ public final static int ZNX = 4; // 绔欏唴鎺ㄩ�� public final static int WEEX = 5; // 绔欏唴鎺ㄩ�� public final static int BAICHUAN = 6; // 绔欏唴鎺ㄩ�� + public final static int WELFARE_CENTER = 7; // 绂忓埄涓績 @Resource private PushRecordService pushRecordService; @@ -54,7 +55,7 @@ @Resource private PushService pushService; - + @Resource private UserSystemMsgService userSystemMsgService; @@ -153,7 +154,7 @@ JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("杞摼鏁版嵁涓嶈兘涓虹┖")); return; } - + try { String shortLink = org.yeshi.utils.HttpUtil.getShortLink(url); @@ -161,17 +162,15 @@ jsonData.put("url", url); jsonData.put("shortLink", shortLink); JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(jsonData)); - + } catch (Exception e) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("杞崲澶辫触")); e.printStackTrace(); } } - - /** - * 鍟嗗搧鎺ㄩ�� -(鏂板悗鍙�) + * 鍟嗗搧鎺ㄩ�� -(鏂板悗鍙�) * * @param uId * -鐢ㄦ埛ID 鍙负绌� @@ -185,8 +184,9 @@ * @throws Exception */ @RequestMapping(value = "newPushGoodsAll") - public void newPushGoodsAll(String callback, Long uid, String url, String title, String content, PrintWriter out) throws Exception { - + public void newPushGoodsAll(String callback, Long uid, String url, String title, String content, PrintWriter out) + throws Exception { + String auctionId = null; if (!StringUtil.isNullOrEmpty(url) && url.contains("id=")) { String[] sts = url.split("\\?")[1].split("&"); @@ -215,7 +215,7 @@ e.printStackTrace(); } } - + /** * 缃戦〉鎺ㄩ�� -(鏂板悗鍙�) * @@ -227,7 +227,7 @@ */ @RequestMapping(value = "newPushUrlAll") public void newPushUrlAll(String callback, String url, String title, String content, PrintWriter out) { - + if (StringUtil.isNullOrEmpty(url) || StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇峰~鍐欓摼鎺ワ紝鏍囬涓庡唴瀹�")); return; @@ -238,7 +238,7 @@ JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏍囬鎴栧唴瀹硅繃闀匡紝璇峰垹鍑忓悗鍐嶈瘯")); return; } - + try { pushService.pushUrl(null, url, title, content); JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("鎺ㄩ�佹垚鍔�")); @@ -247,7 +247,7 @@ e.printStackTrace(); } } - + /** * * 鏂规硶璇存槑: 绔欏唴淇℃帹閫� -(鏂板悗鍙�) @@ -259,19 +259,19 @@ */ @RequestMapping(value = "newPushFanZNX") public void newPushFanZNX(String callback, String uids, String title, String content, PrintWriter out) { - + if (StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇峰~鍐欐爣棰樹笌鍐呭")); return; } - + try { - + String[] uidArray = null; if (uids != null) { uidArray = uids.split(","); } - + if (uidArray == null) { pushService.pushZNX(null, title, content); } else { @@ -279,10 +279,9 @@ String str_uid = uidArray[i]; if (str_uid != null && str_uid.trim().length() > 0) { pushService.pushZNX(Long.parseLong(str_uid), title, content); - - userSystemMsgService.addUserSystemMsg(Long.parseLong(str_uid), - UserSystemMsgTypeEnum.question, title, content, - UserSystemMsg.TIME_TAG_EMERGENT, null); + + userSystemMsgService.addUserSystemMsg(Long.parseLong(str_uid), UserSystemMsgTypeEnum.question, + title, content, UserSystemMsg.TIME_TAG_EMERGENT, null); } } } @@ -295,7 +294,6 @@ } } - /** * * 鏂规硶璇存槑: 鐧惧窛鎺ㄩ�� -(鏂板悗鍙�) @@ -306,21 +304,20 @@ * @throws Exception */ @RequestMapping(value = "pushBaiChuan") - public void pushBaiChuan(String callback, String uids, String title, String content, String url, - PrintWriter out) { - + public void pushBaiChuan(String callback, String uids, String title, String content, String url, PrintWriter out) { + if (StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璇峰~鍐欐爣棰樹笌鍐呭")); return; } - + try { - + String[] uidArray = null; if (uids != null) { uidArray = uids.split(","); } - + if (uidArray == null) { pushService.pushBaiChuanUrl(null, title, content, url); } else { @@ -332,7 +329,7 @@ } } JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("鎺ㄩ�佹垚鍔�")); - + } catch (PushException e) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg())); } catch (Exception e) { @@ -340,5 +337,5 @@ e.printStackTrace(); } } - + } -- Gitblit v1.8.0