mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-12 21:53:48 +08:00
Merge branch 'master' of gitee.com:lab1024/smart-admin into master
Signed-off-by: 大熊 <daxiongren@foxmail.com>
This commit is contained in:
@@ -109,6 +109,11 @@ public class AdminInterceptor implements HandlerInterceptor {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 如果是超级管理员的话,不需要校验权限
|
||||
if(requestEmployee.getAdministratorFlag()){
|
||||
return true;
|
||||
}
|
||||
|
||||
SaStrategy.instance.checkMethodAnnotation.accept(method);
|
||||
|
||||
} catch (SaTokenException e) {
|
||||
|
||||
@@ -44,11 +44,9 @@ public class NoticeVO {
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
@Schema(description = "作者")
|
||||
@NotBlank(message = "作者不能为空")
|
||||
private String author;
|
||||
|
||||
@Schema(description = "来源")
|
||||
@NotBlank(message = "标题不能为空")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "文号")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.lab1024.sa.admin.module.system.login.controller;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.extra.servlet.ServletUtil;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -47,7 +48,10 @@ public class LoginController {
|
||||
@GetMapping("/login/getLoginInfo")
|
||||
@Operation(summary = "获取登录结果信息 @author 卓大")
|
||||
public ResponseDTO<LoginResultVO> getLoginInfo() {
|
||||
return ResponseDTO.ok(loginService.getLoginResult(AdminRequestUtil.getRequestUser()));
|
||||
LoginResultVO loginResult = loginService.getLoginResult(AdminRequestUtil.getRequestUser());
|
||||
String tokenValue = StpUtil.getTokenValue();
|
||||
loginResult.setToken(tokenValue);
|
||||
return ResponseDTO.ok(loginResult);
|
||||
}
|
||||
|
||||
@Operation(summary = "退出登陆 @author 卓大")
|
||||
|
||||
Reference in New Issue
Block a user