修改分页、模拟登录等接口
This commit is contained in:
parent
f678d39de1
commit
26720fa425
|
|
@ -16,6 +16,7 @@ import java.util.Collection;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PageResult<T> extends Result<Collection<T>> {
|
||||
|
||||
/**
|
||||
* 总记录数
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import java.util.Map;
|
|||
*/
|
||||
@NoRepositoryBean
|
||||
public interface PagingAndSortingSpecificationRepository<T> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ public class PageBean {
|
|||
private Integer totalPage;
|
||||
private Integer count;
|
||||
|
||||
|
||||
public static PageBean buildPageBean(Integer page, Integer pageSize, Integer count) {
|
||||
return new PageBean(page, pageSize, count);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ import java.util.Optional;
|
|||
* @author huxin
|
||||
*/
|
||||
public class PageableHelper {
|
||||
|
||||
|
||||
/**
|
||||
* 生成分页数据
|
||||
*
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ package com.aisino.iles.core.model;
|
|||
* 可分页查询的实体
|
||||
*/
|
||||
public interface PageQueryable {
|
||||
|
||||
/**
|
||||
* 页数
|
||||
* @return 页数
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ public class TokenUtil {
|
|||
TokenUtil.objectMapper = objectMapper;
|
||||
}
|
||||
|
||||
|
||||
public static Boolean validateToken(String token) {
|
||||
Token token1 = parseToken(token);
|
||||
if (token1 == null) {
|
||||
|
|
@ -100,6 +101,7 @@ public class TokenUtil {
|
|||
return Optional.empty();
|
||||
}
|
||||
|
||||
|
||||
public static String signFrom(String token) {
|
||||
return Optional.ofNullable(token)
|
||||
.map(StrUtil::trimToNull)
|
||||
|
|
|
|||
Loading…
Reference in New Issue