| | |
| | | */
|
| | | @RequestMapping("freeGoods")
|
| | | public void freeGoods(String callback, Integer page, PrintWriter out) {
|
| | |
|
| | | if (page == null || page < 1)
|
| | | page = 1;
|
| | |
|
| | | int pageSize = Constant.PAGE_SIZE;
|
| | |
|
| | | double tkRate = 20;
|
| | | String lableName = "9.9";
|
| | |
|
| | | try {
|
| | | List<QualityFactory> listQuery = qualityGoodsService.listFreeGoods((page - 1) * pageSize, pageSize, tkRate,
|
| | | lableName);
|
| | | if (page == null || page < 1)
|
| | | page = 1;
|
| | | |
| | | int pageSize = Constant.PAGE_SIZE;
|
| | | |
| | | List<QualityFactory> listQuery = qualityGoodsService.listFreeGoods((page - 1) * pageSize, pageSize);
|
| | | if (listQuery == null || listQuery.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
|
| | | return;
|
| | |
| | | array.add(gson.toJson(extra));
|
| | | }
|
| | |
|
| | | long count = qualityGoodsService.countFreeGoods(tkRate, lableName);
|
| | | long count = qualityGoodsService.countFreeGoods();
|
| | |
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | |
| | |
|
| | | data.put("count", count);
|
| | | data.put("result_list", array);
|
| | | |
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | |
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("数据暂未提供"));
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|