参数校验
This commit is contained in:
@ -40,7 +40,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@RestController
|
||||
@RequestMapping("userInfo")
|
||||
@Slf4j
|
||||
@Tag(name = "用户表管理")
|
||||
@Tag(name = "用户管理")
|
||||
public class UserInfoController {
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ public class UserInfoController {
|
||||
@PostMapping("logout")
|
||||
@Operation(summary = "web端管理员退出登录", description = "参数:JWT,权限:管理员(boss, admin),方法名:userInfoLogout")
|
||||
@RequiresPermission(mustRole = UserConstant.ADMIN_ROLE)
|
||||
public BaseResponse<Boolean> userInfoLogout(@NotBlank @RequestHeader("Authorization") String token) {
|
||||
public BaseResponse<Boolean> userInfoLogout(@RequestHeader("Authorization") String token) {
|
||||
// 获取token的过期时间
|
||||
DecodedJWT decodedJWT = jwtUtils.verify(token);
|
||||
long expirationTime = decodedJWT.getExpiresAt().getTime() - System.currentTimeMillis();
|
||||
@ -152,12 +152,10 @@ public class UserInfoController {
|
||||
Page<UserInfo> page = userInfoService.page(new Page<>(current, pageSize), queryWrapper);
|
||||
List<UserInfo> userInfoList = page.getRecords();
|
||||
List<UserInfoVO> userInfoVOList = commonService.convertList(userInfoList, UserInfoVO.class);
|
||||
Page<UserInfoVO> voPage = new Page<>();
|
||||
Page<UserInfoVO> voPage = new Page<>(current, pageSize);
|
||||
voPage.setRecords(userInfoVOList);
|
||||
voPage.setPages(page.getPages());
|
||||
voPage.setCurrent(page.getCurrent());
|
||||
voPage.setTotal(page.getTotal());
|
||||
voPage.setSize(page.getSize());
|
||||
return ResultUtils.success(voPage);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user