|
|
@@ -4,6 +4,7 @@ import cn.tr.module.sys.tenant.dto.SysTenantAddDTO;
|
|
|
import cn.tr.module.sys.tenant.dto.SysTenantCommonDTO;
|
|
|
import cn.tr.core.enums.CreateEnum;
|
|
|
import cn.tr.module.api.sys.log.annotation.OperateLog;
|
|
|
+import cn.tr.plugin.security.context.LoginUserContextHolder;
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.tr.core.validation.Insert;
|
|
|
@@ -44,6 +45,7 @@ public class SysTenantController extends BaseController{
|
|
|
return CommonResult.success(sysTenantService.selectSysTenantList(query));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@ApiOperationSupport(author = "lf",order = 2)
|
|
|
@ApiOperation(value = "根据id查询租户列表",notes = "权限: sys:tenant:query")
|
|
|
@GetMapping("/detail/{id}")
|
|
|
@@ -79,4 +81,11 @@ public class SysTenantController extends BaseController{
|
|
|
public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
|
|
|
return CommonResult.success(sysTenantService.removeSysTenantByIds(ids));
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperationSupport(author = "lf",order = 6)
|
|
|
+ @ApiOperation(value="查询当前用户的租户信息",notes = "权限: 无")
|
|
|
+ @PostMapping("/query/current")
|
|
|
+ public CommonResult<SysTenantCommonDTO> selectList() {
|
|
|
+ return CommonResult.success(sysTenantService.selectSysTenantById(LoginUserContextHolder.getUser().getTenantId()));
|
|
|
+ }
|
|
|
}
|