Browse Source

账号密码错误修复

zyh
小久哥 3 years ago
parent
commit
e67f42f033
  1. 16
      yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java

16
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java

@ -71,6 +71,8 @@ public class AuthController {
private CpUserService cpUserService;
@Resource
private WxCpService wxCpService;
@Resource
private UserSessionService userSessionService;
@PostMapping("/login")
@ -109,11 +111,15 @@ public class AuthController {
userService.updateUser(UserConvert.INSTANCE.convertFromEntity(user));
}
AuthLoginReqVO login = AuthLoginReqVO.builder()
.username(cpuser.getUserId())
.password("123456")
.platform("wxcp").build();
String token = authService.login(login, getClientIP(), getUserAgent());
// AuthLoginReqVO login = AuthLoginReqVO.builder()
// .username(cpuser.getUserId())
// .password("123456")
// .platform("wxcp").build();
// String token = authService.login(login, getClientIP(), getUserAgent());
LoginUser login = AuthConvert.INSTANCE.convert(user);
String token = userSessionService.createUserSession(login, getClientIP(), getUserAgent());
log.info("TOKEN:::{}",token);
AuthLoginRespVO vo = AuthLoginRespVO.builder().token(token).user(cpuser).build();

Loading…
Cancel
Save