陈昶聿
15 小时以前 275cc504242a476b88892395f020be15f7b75d0c
ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java
@@ -38,4 +38,13 @@
    public static void clearPage() {
        PageHelper.clearPage();
    }
    /**
     * 计算偏移量
     */
    public static Integer getOffset(Integer pageNum, Integer pageSize) {
        if (pageNum == null || pageNum == 0) pageNum = 1;
        if (pageSize == null) pageSize = 10;
        return (pageNum - 1) * pageSize;
    }
}