add isEmpty and isNotEmpty

This commit is contained in:
Timi
2025-12-25 18:25:24 +08:00
parent 2a948a3c59
commit 46f79f8b6b

View File

@ -18,6 +18,24 @@ public class BasePageResult<T> {
protected List<T> list; protected List<T> list;
/**
* 结果是否为空
*
* @return true 为空
*/
public boolean isEmpty() {
return list.isEmpty();
}
/**
* 结果是否非空
*
* @return true 为非空
*/
public boolean isNotEmpty() {
return !isEmpty();
}
/** /**
* 获取总数据量 * 获取总数据量
* *