Commit b72ae1ef authored by chang20170705's avatar chang20170705

page

parent 0019fa51
......@@ -118,6 +118,8 @@ public class BrandController {
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "OrgNO", dataType = "String", required = true, value = "区域编号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "CompNO", dataType = "String", required = true, value = "组件编号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "index", dataType = "String", required = false, value = "第几页", defaultValue = "1"),
@ApiImplicitParam(paramType = "query", name = "limit", dataType = "String", required = false, value = "每页数量", defaultValue = "20"),
})
@RequestMapping(value = "/getHotSaleBrands",method=RequestMethod.GET)
public String getHotSaleBrands(HttpServletRequest request, HttpServletResponse response) {
......@@ -126,11 +128,11 @@ public class BrandController {
params.put("OrgNO", request.getParameter("OrgNO"));
params.put("CompNO", request.getParameter("CompNO"));
Page page=new Page();
page.setIndex(1l);
page.setLimit(20l);
page.setIndex(Long.valueOf(request.getParameter("index")==null?"1":request.getParameter("index")));
page.setLimit(Long.valueOf(request.getParameter("limit")==null?"20":request.getParameter("limit")));
page.setLimitKey("SaleQty desc");
listMap=brandService.getHotSaleBrands(params,page);
return Rjx.jsonOk().set("list", listMap).toJson();
return Rjx.jsonOk().set("list", listMap).set("page",page).toJson();
}
}
......@@ -77,6 +77,8 @@ public class GoodsController {
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "OrgNO", dataType = "String", required = true, value = "区域编号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "CompNO", dataType = "String", required = true, value = "组件编号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "index", dataType = "String", required = false, value = "第几页", defaultValue = "1"),
@ApiImplicitParam(paramType = "query", name = "limit", dataType = "String", required = false, value = "每页数量", defaultValue = "20"),
})
@RequestMapping(value = "/getHotSaleGoods",method=RequestMethod.GET)
public String getHotSaleGoods(HttpServletRequest request, HttpServletResponse response) {
......@@ -85,10 +87,10 @@ public class GoodsController {
params.put("OrgNO", request.getParameter("OrgNO"));
params.put("CompNO", request.getParameter("CompNO"));
Page page=new Page();
page.setIndex(1l);
page.setLimit(20l);
page.setIndex(Long.valueOf(request.getParameter("index")==null?"1":request.getParameter("index")));
page.setLimit(Long.valueOf(request.getParameter("limit")==null?"20":request.getParameter("limit")));
page.setLimitKey("SaleQty desc");
listMap=goodsService.getHotSaleGoods(params,page);
return Rjx.jsonOk().set("list", listMap).toJson();
return Rjx.jsonOk().set("list", listMap).set("page",page).toJson();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment