Browse Source

String username = SecurityUserUtils.username();

pull/353/head
suqin 11 months ago
parent
commit
8d6fb657d4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/utils/CurrentUserUtil.java

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/utils/CurrentUserUtil.java View File

@@ -48,8 +48,8 @@ public class CurrentUserUtil {
* @return
*/
public static User getUserInfo() {
// String username = "admin";
String username = SecurityUserUtils.username();

User user = currentUserUtil.userMapper.selectOne(Wrappers.<User>lambdaQuery().eq(User::getMark, 1).eq(User::getStatus, 1).eq(User::getUsername, username));
if (null == user) {
Tenant tenant = currentUserUtil.tenantMapper.selectOne(Wrappers.<Tenant>lambdaQuery().eq(Tenant::getMark, 1).eq(Tenant::getStatus, 1).eq(Tenant::getUsername, username));

Loading…
Cancel
Save