Browse Source

BUG修复

master
wxc 2 years ago
parent
commit
293fa7d60d
  1. 5
      mailbox-lan/src/main/java/com/biutag/lan/config/AdminInterceptor.java

5
mailbox-lan/src/main/java/com/biutag/lan/config/AdminInterceptor.java

@ -42,7 +42,6 @@ public class AdminInterceptor implements HandlerInterceptor {
public boolean preHandle(@NotNull HttpServletRequest request, public boolean preHandle(@NotNull HttpServletRequest request,
@NotNull HttpServletResponse response, @NotNull HttpServletResponse response,
@NotNull Object handler) throws Exception { @NotNull Object handler) throws Exception {
// 请求方法类型 // 请求方法类型
String reqUri = request.getRequestURI(); String reqUri = request.getRequestURI();
if (!(handler instanceof HandlerMethod) || !reqUri.startsWith("/api")) { if (!(handler instanceof HandlerMethod) || !reqUri.startsWith("/api")) {
@ -137,8 +136,8 @@ public class AdminInterceptor implements HandlerInterceptor {
AdminThreadLocal.put("empNo", adminUser.getEmpNo()); AdminThreadLocal.put("empNo", adminUser.getEmpNo());
AdminThreadLocal.put("name", adminUser.getName()); AdminThreadLocal.put("name", adminUser.getName());
AdminThreadLocal.put("roleIds", adminUser.getRoleId()); AdminThreadLocal.put("roleIds", adminUser.getRoleId());
AdminThreadLocal.put("deptIds", adminUser.getDeptId()); AdminThreadLocal.put("deptIds", adminUser.getDataDeptId());
AdminThreadLocal.put("deptName", adminUser.getDeptName()); AdminThreadLocal.put("deptName", adminUser.getDataDeptName());
AdminThreadLocal.put("roleName", adminUser.getRoleName()); AdminThreadLocal.put("roleName", adminUser.getRoleName());
// 权限校验 // 权限校验
if (!adminUser.getId().equals(1)) { if (!adminUser.getId().equals(1)) {

Loading…
Cancel
Save