分页查询模板修复
This commit is contained in:
parent
778864f28c
commit
958acd7485
@ -1,6 +1,7 @@
|
|||||||
package ${packageName}.controller;
|
package ${packageName}.controller;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.jg.framework.aspectj.lang.enums.BusinessType;
|
import com.jg.framework.aspectj.lang.enums.BusinessType;
|
||||||
@ -43,7 +44,8 @@ public class ${ClassName}Controller extends BaseController{
|
|||||||
public R listPage(QueryPage queryPage,${ClassName} ${className}) {
|
public R listPage(QueryPage queryPage,${ClassName} ${className}) {
|
||||||
startPage();
|
startPage();
|
||||||
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
|
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
|
||||||
return R.page(queryPage.getPageNum(),queryPage.getPageSize(),list.size(),list);
|
int size = Integer.parseInt(String.valueOf(new PageInfo(list).getTotal()));
|
||||||
|
return R.page(queryPage.getPageNum(),queryPage.getPageSize(),size,list);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* ${functionName}列表
|
* ${functionName}列表
|
||||||
|
Loading…
Reference in New Issue
Block a user