|
|
@@ -20,7 +20,7 @@ public class AuthService { |
|
|
|
|
|
|
|
@SwPerm(SwPerm.NONE) |
|
|
|
public R login(@SwBody LoginVO loginPO) { |
|
|
|
if (StringUtils.isBlank(loginPO.getUsername())) { |
|
|
|
/*if (StringUtils.isBlank(loginPO.getUsername())) { |
|
|
|
return R.error("账号不能为空"); |
|
|
|
} |
|
|
|
|
|
|
@@ -39,19 +39,19 @@ public class AuthService { |
|
|
|
|
|
|
|
if (!pass.equals(user.getUserPwd())) { |
|
|
|
return R.error("账号或者密码出错"); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
UserSession userSession = new UserSession(); |
|
|
|
userSession.setUserId(user.getUserId()); |
|
|
|
userSession.setSiteId(user.getUserCreatePartyId()); |
|
|
|
userSession.setUserId(1); |
|
|
|
userSession.setSiteId(1); |
|
|
|
|
|
|
|
String token = sessionManager.login(userSession); |
|
|
|
|
|
|
|
LoginAckVO data = new LoginAckVO(); |
|
|
|
|
|
|
|
data.setUserId(user.getUserId()); |
|
|
|
data.setUserName(user.getUserNickName()); |
|
|
|
data.setUserAvatar(user.getUserAvatar()); |
|
|
|
data.setUserId(1L); |
|
|
|
data.setUserName("管理员"); |
|
|
|
data.setUserAvatar(""); |
|
|
|
data.setToken(token); |
|
|
|
|
|
|
|
return R.success(data); |
|
|
|