Commit ef20d533 by zhangkb

需改短板管理和短板单元查询分页参数

parent 7c7fce42
......@@ -82,7 +82,7 @@ public class ShortboardRuleCtrl {
@PostMapping(value = "/getByCatalogId")
public Map<String,Object> getByCatalogId(@RequestParam Integer catalogId,
@RequestParam(required = false) String keyword,
@RequestParam(value = "page", required = false, defaultValue = "1") int page,
@RequestParam(value = "page", required = false, defaultValue = "0") int page,
@RequestParam(value = "rows", required = false, defaultValue = "10") int rows){
return shortboardRuleService.getByCatalogId(catalogId,keyword,page,rows);
}
......
......@@ -86,7 +86,7 @@ public class ShortboardUnitCtrl {
@PostMapping(value = "/getByCatalogId")
public Map<String,Object> getByCatalogId(@RequestParam Integer catalogId,
@RequestParam(required = false) String keyword,
@RequestParam(value = "page", required = false, defaultValue = "1") int page,
@RequestParam(value = "page", required = false, defaultValue = "0") int page,
@RequestParam(value = "rows", required = false, defaultValue = "10") int rows){
return shortboardUnitService.getByCatalogId(catalogId,keyword,page,rows);
}
......
......@@ -71,7 +71,7 @@ public class ShortboardRuleService {
}
int count = 0;
//计算start
int start = (page-1)*rows;
int start = page*rows;
count = shortboardRuleMapper.countByCatalogId(catalogId, keyword);
List<ShortboardRule> datas = shortboardRuleMapper.findByCatalogId(catalogId, keyword, start, rows);
// List<ShortboardRule> resultDatas = new ArrayList<>();
......
......@@ -62,7 +62,7 @@ public class ShortboardUnitService {
}
int count = 0;
//计算start
int start = (page-1)*rows;
int start = page*rows;
count = shortboardUnitMapper.countByCatalogId(catalogId,keyword);
List<ShortboardUnit> datas = shortboardUnitMapper.findByCatalogId(catalogId, keyword, start, rows);
result.put("count", count);
......
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