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