|
|
@ -3,22 +3,13 @@ package com.cloud.kicc.system.controller; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.cloud.kicc.common.core.api.R; |
|
|
|
import com.cloud.kicc.common.core.api.R; |
|
|
|
import com.cloud.kicc.common.core.constant.AppConstants; |
|
|
|
import com.cloud.kicc.common.core.constant.AppConstants; |
|
|
|
import com.cloud.kicc.common.core.constant.CacheConstants; |
|
|
|
|
|
|
|
import com.cloud.kicc.common.core.constant.SecurityConstants; |
|
|
|
|
|
|
|
import com.cloud.kicc.common.log.annotation.SysLog; |
|
|
|
import com.cloud.kicc.common.log.annotation.SysLog; |
|
|
|
import com.cloud.kicc.common.security.annotation.Inner; |
|
|
|
|
|
|
|
import com.cloud.kicc.system.api.entity.DictData; |
|
|
|
|
|
|
|
import com.cloud.kicc.system.api.entity.Tenant; |
|
|
|
import com.cloud.kicc.system.api.entity.Tenant; |
|
|
|
import com.cloud.kicc.system.api.feign.RemoteDictService; |
|
|
|
|
|
|
|
import com.cloud.kicc.system.service.DictDataService; |
|
|
|
|
|
|
|
import com.cloud.kicc.system.service.TenantService; |
|
|
|
import com.cloud.kicc.system.service.TenantService; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.cache.annotation.Cacheable; |
|
|
|
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
@ -41,6 +32,7 @@ public class TenantController { |
|
|
|
|
|
|
|
|
|
|
|
private LambdaQueryWrapper<Tenant> getQueryWrapper(Tenant tenant) { |
|
|
|
private LambdaQueryWrapper<Tenant> getQueryWrapper(Tenant tenant) { |
|
|
|
return new LambdaQueryWrapper<Tenant>() |
|
|
|
return new LambdaQueryWrapper<Tenant>() |
|
|
|
|
|
|
|
.in(StrUtil.isNotBlank(tenant.getCode()), Tenant::getCode, tenant.getTenantIds()) |
|
|
|
.like(StrUtil.isNotBlank(tenant.getName()), Tenant::getName, tenant.getName()) |
|
|
|
.like(StrUtil.isNotBlank(tenant.getName()), Tenant::getName, tenant.getName()) |
|
|
|
.eq(StrUtil.isNotBlank(tenant.getCode()), Tenant::getCode, tenant.getCode()) |
|
|
|
.eq(StrUtil.isNotBlank(tenant.getCode()), Tenant::getCode, tenant.getCode()) |
|
|
|
.eq(StrUtil.isNotBlank(tenant.getStatus()), Tenant::getStatus, tenant.getStatus()); |
|
|
|
.eq(StrUtil.isNotBlank(tenant.getStatus()), Tenant::getStatus, tenant.getStatus()); |
|
|
|