陈昶聿
2026-05-13 de428dd223bfc4a3b80578e8371f0915c77abaf4
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;
    }
}