|
|
@@ -7,6 +7,8 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.web.bind.WebDataBinder;
|
|
|
import org.springframework.web.bind.annotation.InitBinder;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.ufo.base.common.constant.HttpStatus;
|
|
|
@@ -76,6 +78,11 @@ public class BaseController
|
|
|
PageUtils.clearPage();
|
|
|
}
|
|
|
|
|
|
+ protected PageDomain getRequestCommonParams()
|
|
|
+ {
|
|
|
+ return TableSupport.buildPageRequest();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 响应请求分页数据
|
|
|
*/
|
|
|
@@ -90,6 +97,16 @@ public class BaseController
|
|
|
return rspData;
|
|
|
}
|
|
|
|
|
|
+ protected TableDataInfo getDataTable(IPage<?> page)
|
|
|
+ {
|
|
|
+ TableDataInfo rspData = new TableDataInfo();
|
|
|
+ rspData.setCode(HttpStatus.SUCCESS);
|
|
|
+ rspData.setMsg("查询成功");
|
|
|
+ rspData.setRows(page.getRecords());
|
|
|
+ rspData.setTotal(page.getTotal());
|
|
|
+ return rspData;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 返回成功
|
|
|
*/
|