修改类名,调整包结构。

dev
ZhouXY108 2024-08-16 15:06:22 +08:00
parent d580c4757e
commit 516c9d9d79
4 changed files with 9 additions and 9 deletions

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package xyz.zhouxy.plusone.commons.domain;
package xyz.zhouxy.plusone.commons.model;
import java.io.Serializable;
import java.util.Objects;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package xyz.zhouxy.plusone.commons.util;
package xyz.zhouxy.plusone.commons.model.dto;
import java.util.List;
@ -30,21 +30,21 @@ import xyz.zhouxy.plusone.commons.annotation.StaticFactoryMethod;
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
* @see PagingAndSortingQueryParams
*/
public class PageDTO<T> {
public class PageResult<T> {
private final long total;
private final List<T> content;
private PageDTO(List<T> content, long total) {
private PageResult(List<T> content, long total) {
Preconditions.checkNotNull(content, "Content must not be null.");
this.content = content;
this.total = total;
}
@StaticFactoryMethod(PageDTO.class)
public static <T> PageDTO<T> of(List<T> content, long total) {
return new PageDTO<>(content, total);
@StaticFactoryMethod(PageResult.class)
public static <T> PageResult<T> of(List<T> content, long total) {
return new PageResult<>(content, total);
}
public long getTotal() {

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package xyz.zhouxy.plusone.commons.util;
package xyz.zhouxy.plusone.commons.model.dto;
import java.util.Objects;
import java.util.function.BooleanSupplier;

View File

@ -1,4 +1,4 @@
package xyz.zhouxy.plusone.commons.domain;
package xyz.zhouxy.plusone.commons.model;
import static org.junit.jupiter.api.Assertions.assertNotNull;