From 114685cc870d0e00dc157656ae9039f285d3f5f1 Mon Sep 17 00:00:00 2001 From: Administrator <Administrator@S0ZHK00LKCA6OYY> Date: 星期五, 30 十一月 2018 15:59:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java | 34 ++++++++++++++++++---------------- 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java index 32a7c31..1589e60 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java @@ -211,7 +211,7 @@ * @param out */ @RequestMapping(value = "/gethistory", method = RequestMethod.POST) - public void getHistory(AcceptData acceptData, String deviceToken, int page, PrintWriter out) { + public void getHistory(AcceptData acceptData, Long uid, String deviceToken, int page, PrintWriter out) { long count = 0; List<PushGoods> list = null; @@ -224,11 +224,11 @@ // 璁惧娉ㄥ唽鏃堕棿 Date createTime = deviceActive.getCreateTime(); - count = PushGoodsService.countHistoryByPushTime(createTime); + count = PushGoodsService.countHistoryByPushTime(uid, createTime); int pageSize = Constant.PAGE_SIZE; - list = PushGoodsService.listHistoryByPushTime((page - 1) * pageSize, pageSize, createTime); + list = PushGoodsService.listHistoryByPushTime((page - 1) * pageSize, pageSize, uid, createTime); if (list != null && list.size() > 0) { for (PushGoods pushGoods : list) { JSONObject result = new JSONObject(); @@ -273,21 +273,23 @@ String fontColor2 = "#F14242"; JSONArray array = new JSONArray(); - JSONArray array1 = new JSONArray(); - array1.add(fontColor1); - array1.add("鏈鎺ㄩ�佸叡"); + - JSONArray array2 = new JSONArray(); - array2.add(fontColor2); - array2.add(totalgoods); + JSONObject contentJson1 = new JSONObject(); + contentJson1.put("color", fontColor1); + contentJson1.put("content", "鏈鎺ㄩ�佸叡"); + + JSONObject contentJson2 = new JSONObject(); + contentJson2.put("color", fontColor2); + contentJson2.put("content", totalgoods); + + JSONObject contentJson3 = new JSONObject(); + contentJson3.put("color", fontColor1); + contentJson3.put("content", "涓晢鍝�"); - JSONArray array3 = new JSONArray(); - array3.add(fontColor1); - array3.add("涓晢鍝�"); - - array.add(array1); - array.add(array2); - array.add(array3); + array.add(contentJson1); + array.add(contentJson2); + array.add(contentJson3); result.put("totalwords", array); -- Gitblit v1.8.0