Commit 0e21cf94 by 袁伟铭

添加token登录方法

parent 64a47c99
...@@ -126,21 +126,21 @@ public class SingleService { ...@@ -126,21 +126,21 @@ public class SingleService {
} }
ResultVo resultVo = JSONUtil.toBean(body, ResultVo.class); ResultVo resultVo = JSONUtil.toBean(body, ResultVo.class);
if (resultVo.isSuccess()) { AssertUtils.isTrue(resultVo.isSuccess(), resultVo.getErrMsg());
JSONObject obj = JSONUtil.parseObj(resultVo.getData());
String userId = obj.getStr("userId"); JSONObject obj = JSONUtil.parseObj(resultVo.getData());
String username = obj.getStr("username"); String userId = obj.getStr("userId");
String username = obj.getStr("username");
BindUserInfo build = BindUserInfo.builder()
.userId(ContextUtils.getAdminUserId()) BindUserInfo build = BindUserInfo.builder()
.sysId(sysInfo.getId()) .userId(ContextUtils.getAdminUserId())
.sysName(sysInfo.getSystemName()) .sysId(sysInfo.getId())
.systemUserId(userId) .sysName(sysInfo.getSystemName())
.systemUserName(username) .systemUserId(userId)
.build(); .systemUserName(username)
.build();
blindUserInfoDao.insert(build);
} blindUserInfoDao.insert(build);
} }
public Object login(SingleLoginVo vo, HttpServletRequest request, HttpServletResponse response) { public Object login(SingleLoginVo vo, HttpServletRequest request, HttpServletResponse response) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment