| | |
| | | |
| | | import cn.hutool.core.collection.ListUtil; |
| | | import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | | import org.dromara.common.tenant.helper.TenantHelper; |
| | |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | @Slf4j |
| | | @AllArgsConstructor |
| | | public class PlusTenantLineHandler implements TenantLineHandler { |
| | | |
| | |
| | | public Expression getTenantId() { |
| | | String tenantId = LoginHelper.getTenantId(); |
| | | if (StringUtils.isBlank(tenantId)) { |
| | | log.error("无法获取有效的租户id -> Null"); |
| | | return new NullValue(); |
| | | } |
| | | String dynamicTenantId = TenantHelper.getDynamic(); |