供应计划,仓库映射接口开发

This commit is contained in:
2025-05-27 14:38:00 +08:00
parent 68e9c20b34
commit 8694b17db4
20 changed files with 1687 additions and 26 deletions

View File

@@ -114,6 +114,8 @@ public class SecurityConfig
requests.antMatchers("/login",
"/register",
"/captchaImage",
"/user/**",
"/query/jh/**",
"/AutoInventory/**",
"/ws/**",
"/information/device/**",

View File

@@ -178,4 +178,28 @@ public class SysLoginService
sysUser.setLoginDate(DateUtils.getNowDate());
userService.updateUserProfile(sysUser);
}
public LoginUser loginWithoutCaptcha(String username, String password) {
loginPreCheck(username, password);
Authentication authentication;
try {
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password);
AuthenticationContextHolder.setContext(token);
authentication = authenticationManager.authenticate(token);
}catch (Exception e){
throw new ServiceException("登录失败");
}finally {
AuthenticationContextHolder.clearContext();
}
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
recordLoginInfo(loginUser.getUserId());
return loginUser;
}
}