From a0a009f30e0e14907e48d6d263e12512f0ccf081 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 04 十二月 2018 15:47:36 +0800 Subject: [PATCH] 正式环境参数修改 --- 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..0454fef 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