This commit is contained in:
caozehui
2026-02-11 16:17:13 +08:00
parent 1219b30f43
commit fac4a39214
40 changed files with 620 additions and 446 deletions

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.func.Func1;
import cn.hutool.core.lang.func.LambdaUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjectUtil;
import com.njcn.msgpush.framework.common.pojo.PageParam;
import com.njcn.msgpush.framework.common.pojo.SortablePageParam;
import com.njcn.msgpush.framework.common.pojo.SortingField;
@@ -64,4 +65,12 @@ public class PageUtils {
}
}
public static Integer getPageNum(PageParam pageParam) {
return !ObjectUtil.isNull(pageParam.getPageNo()) && pageParam.getPageNo() != 0 ? pageParam.getPageNo() : 1;
}
public static Integer getPageSize(PageParam pageParam) {
return !ObjectUtil.isNull(pageParam.getPageSize()) && pageParam.getPageSize() != 0 ? pageParam.getPageSize() : 10;
}
}