Browse Source

登录,去掉实现,避免报错

master
郑根木 2 years ago
parent
commit
a429b48b36
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/AuthService.java

+ 7
- 7
smtweb-framework/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/login/AuthService.java View File

@@ -20,7 +20,7 @@ public class AuthService {


@SwPerm(SwPerm.NONE) @SwPerm(SwPerm.NONE)
public R login(@SwBody LoginVO loginPO) { public R login(@SwBody LoginVO loginPO) {
if (StringUtils.isBlank(loginPO.getUsername())) {
/*if (StringUtils.isBlank(loginPO.getUsername())) {
return R.error("账号不能为空"); return R.error("账号不能为空");
} }


@@ -39,19 +39,19 @@ public class AuthService {


if (!pass.equals(user.getUserPwd())) { if (!pass.equals(user.getUserPwd())) {
return R.error("账号或者密码出错"); return R.error("账号或者密码出错");
}
}*/


UserSession userSession = new UserSession(); UserSession userSession = new UserSession();
userSession.setUserId(user.getUserId());
userSession.setSiteId(user.getUserCreatePartyId());
userSession.setUserId(1);
userSession.setSiteId(1);


String token = sessionManager.login(userSession); String token = sessionManager.login(userSession);


LoginAckVO data = new LoginAckVO(); 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); data.setToken(token);


return R.success(data); return R.success(data);


Loading…
Cancel
Save