Commit 69a23021 by tyfanchz

根据条件区分是否分页

1 parent d70d3ae0
...@@ -26,8 +26,10 @@ public class AdMgrServiceImpl implements AdMgrService { ...@@ -26,8 +26,10 @@ public class AdMgrServiceImpl implements AdMgrService {
@Override @Override
public R getAdMgrList(Page page, PlatformAd ad) { public R getAdMgrList(Page page, PlatformAd ad) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面 //PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
PageHelper.startPage(page.getPageNumber(), page.getPageSize(), if (page.getPageNumber() > 0) {
true); PageHelper.startPage(page.getPageNumber(), page.getPageSize(),
true);
}
List<PlatformAd> adMgrList = adMapper.getAdMgrList(ad); List<PlatformAd> adMgrList = adMapper.getAdMgrList(ad);
return R.ok().putPageData(adMgrList); return R.ok().putPageData(adMgrList);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!