修改分页、模拟登录等接口

This commit is contained in:
songxudong 2025-03-28 13:50:23 +08:00
parent f678d39de1
commit 26720fa425
6 changed files with 7 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import java.util.Collection;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
public class PageResult<T> extends Result<Collection<T>> { public class PageResult<T> extends Result<Collection<T>> {
/** /**
* 总记录数 * 总记录数
*/ */

View File

@ -23,6 +23,7 @@ import java.util.Map;
*/ */
@NoRepositoryBean @NoRepositoryBean
public interface PagingAndSortingSpecificationRepository<T> { public interface PagingAndSortingSpecificationRepository<T> {
/** /**
* 分页查询 * 分页查询
* *

View File

@ -16,7 +16,6 @@ public class PageBean {
private Integer totalPage; private Integer totalPage;
private Integer count; private Integer count;
public static PageBean buildPageBean(Integer page, Integer pageSize, Integer count) { public static PageBean buildPageBean(Integer page, Integer pageSize, Integer count) {
return new PageBean(page, pageSize, count); return new PageBean(page, pageSize, count);
} }

View File

@ -12,6 +12,8 @@ import java.util.Optional;
* @author huxin * @author huxin
*/ */
public class PageableHelper { public class PageableHelper {
/** /**
* 生成分页数据 * 生成分页数据
* *

View File

@ -4,6 +4,7 @@ package com.aisino.iles.core.model;
* 可分页查询的实体 * 可分页查询的实体
*/ */
public interface PageQueryable { public interface PageQueryable {
/** /**
* 页数 * 页数
* @return 页数 * @return 页数

View File

@ -27,6 +27,7 @@ public class TokenUtil {
TokenUtil.objectMapper = objectMapper; TokenUtil.objectMapper = objectMapper;
} }
public static Boolean validateToken(String token) { public static Boolean validateToken(String token) {
Token token1 = parseToken(token); Token token1 = parseToken(token);
if (token1 == null) { if (token1 == null) {
@ -100,6 +101,7 @@ public class TokenUtil {
return Optional.empty(); return Optional.empty();
} }
public static String signFrom(String token) { public static String signFrom(String token) {
return Optional.ofNullable(token) return Optional.ofNullable(token)
.map(StrUtil::trimToNull) .map(StrUtil::trimToNull)