rocketmq,收益管理,资源管理模块代码
This commit is contained in:
@@ -32,4 +32,23 @@ public class PageUtils extends PageHelper
|
||||
{
|
||||
PageHelper.clearPage();
|
||||
}
|
||||
|
||||
/**
|
||||
* post传参分页
|
||||
* @param pageDomain
|
||||
*/
|
||||
public static void startPage(PageDomain pageDomain)
|
||||
{
|
||||
if(pageDomain.getPageNum() == null) {
|
||||
pageDomain.setPageNum(1);
|
||||
}
|
||||
if(pageDomain.getPageSize() == null) {
|
||||
pageDomain.setPageSize(10);
|
||||
}
|
||||
Integer pageNum = pageDomain.getPageNum();
|
||||
Integer pageSize = pageDomain.getPageSize();
|
||||
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
|
||||
Boolean reasonable = pageDomain.getReasonable();
|
||||
PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
package com.ruoyi.common.core.web.controller;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ruoyi.common.core.constant.HttpStatus;
|
||||
@@ -18,6 +11,14 @@ import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.web.page.TableSupport;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web层通用数据处理
|
||||
@@ -52,6 +53,14 @@ public class BaseController
|
||||
{
|
||||
PageUtils.startPage();
|
||||
}
|
||||
/**
|
||||
* 设置请求分页数据
|
||||
* @param pageDomain
|
||||
*/
|
||||
protected void startPage(PageDomain pageDomain)
|
||||
{
|
||||
PageUtils.startPage(pageDomain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置请求排序数据
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.ruoyi.common.core.web.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
/**
|
||||
* Entity基类
|
||||
@@ -38,10 +39,28 @@ public class BaseEntity implements Serializable
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 当前记录起始索引 */
|
||||
private Integer pageNum;
|
||||
|
||||
/** 每页显示记录数 */
|
||||
private Integer pageSize;
|
||||
/**
|
||||
* 选中的属性名称
|
||||
*/
|
||||
private String[] properties;
|
||||
|
||||
/** 请求参数 */
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Map<String, Object> params;
|
||||
|
||||
public String[] getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
public void setProperties(String[] properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public String getSearchValue()
|
||||
{
|
||||
return searchValue;
|
||||
@@ -102,6 +121,22 @@ public class BaseEntity implements Serializable
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Integer getPageNum() {
|
||||
return pageNum;
|
||||
}
|
||||
|
||||
public void setPageNum(Integer pageNum) {
|
||||
this.pageNum = pageNum;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public Map<String, Object> getParams()
|
||||
{
|
||||
if (params == null)
|
||||
|
||||
Reference in New Issue
Block a user