登录保存店铺名称

This commit is contained in:
张松
2025-03-14 18:14:10 +08:00
parent 2c531d8bc7
commit 1adafc0ad3
4 changed files with 16 additions and 5 deletions

View File

@@ -135,7 +135,7 @@ public class AuthorizationServiceImpl implements AuthorizationService {
}
}
StpKit.USER.login(user.getId(), user.getAccount(), shopInfo.getId(), isStaff ? MyStpLogic.LoginType.STAFF : MyStpLogic.LoginType.MANAGER, user.getIsAdmin());
StpKit.USER.login(user.getId(), user.getAccount(), shopInfo.getId(), shopInfo.getShopName(), isStaff ? MyStpLogic.LoginType.STAFF : MyStpLogic.LoginType.MANAGER, user.getIsAdmin());
// 查询角色
List<SysRole> roleList = sysRoleService.getByUserId(user.getId());
List<String> roleNames = roleList.stream().map(SysRole::getName).collect(Collectors.toList());

View File

@@ -117,7 +117,7 @@ public class UserAuthorizationServiceImpl implements UserAuthorizationService {
userInfo.setLastLoginTime(DateUtil.date().toLocalDateTime());
userInfoService.saveOrUpdate(userInfo);
// StpKit.USER.login(userInfo.getId());
StpKit.USER.login(userInfo.getId(), openId, null, MyStpLogic.LoginType.USER, false);
StpKit.USER.login(userInfo.getId(), openId, null, null, MyStpLogic.LoginType.USER, false);
return new LoginTokenDTO(StpKit.USER.getTokenValue(), userInfo);
}
}