Browse Source

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
69bbdebb1b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/utils/CurrentUserUtil.java

+ 2
- 2
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/utils/CurrentUserUtil.java View File

@@ -2,6 +2,7 @@ package com.tuoheng.miniprogram.utils;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.SecurityUserUtils;
import com.tuoheng.miniprogram.dao.TenantMapper;
import com.tuoheng.miniprogram.dao.UserMapper;
import com.tuoheng.miniprogram.entity.Tenant;
@@ -46,8 +47,7 @@ public class CurrentUserUtil {
* @return
*/
public static User getUserInfo() {
// String username = SecurityUserUtils.username();
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