| | |
| | | * @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;
|
| | |
| | |
|
| | | // 设备注册时间
|
| | | 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();
|
| | |
| | | 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);
|
| | |
|