Bath-bound? As it
--- title: "How-To
Q: how to draw a
A lot of thought w
A novel approach f
Q: Javascript eve

Q: Pass variable
--- title: "List v
It would be a crim

A young mother is
Introduction {#Sec
[Spatiotemporal or
A comparative tria
Pediatric brain tu
Basketball at the
Biosolids are envi
Q: How to stop mu
This invention rel
On May 12, the Oba
package com.github.zuihou.tenant.controller; import com.github.zuihou.base.R; import com.github.zuihou.component.model.AdminModel; import com.github.zuihou.tenant.enumeration.TenantType; import com.github.zuihou.tenant.entity.Tenant; import com.github.zuihou.tenant.service.TenantService; import com.google.common.collect.Lists; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Set; /** *

* 系统模块: 员工 * 含义: 系统内部用户角色的管理 *

* * @author zuihou * @date 2019-10-22 */ @Slf4j @Controller @Api(tags = "TenantController") @RequestMapping("/Tenant") public class TenantController { private final TenantService tenantService; @Autowired public TenantController(TenantService tenantService) { this.tenantService = tenantService; } /** * 登录 * * @return {@link TenantResponse} */ @ApiOperation(value = "登录", notes = "登录请求的信息") @GetMapping @PreAuthorize(value = "hasAnyRole('admin','superUser')") public TenantResponse login() { return tenantService.getAdmin(); } /** * 编辑 * * @return {@link TenantResponse} */ @ApiOperation(value = "编辑", notes = "编辑请求的信息") @GetMapping(value = "/modify", produces = "application/json;charset=UTF-8") @PreAuthorize(value = "hasAnyRole('admin','superUser')") public TenantResponse modify() { return tenantService.modify(); } /** * 删除 * * @return {@link TenantResponse} */ @ApiOperation(value = "删除", notes = "删除请求的信息") @PreAuthorize(value = "hasAnyRole('admin')") @DeleteMapping(value = "/destroy") public TenantResponse destroy() { return tenantService.destroy(); } /** * 创建 * * @return {@link TenantResponse} */ @ApiOperation(value = "创建", notes = "创建请求的信息") @GetMapping(value = "/create") public TenantResponse create() { return tenantService.create(); } /** * 查询列表 * * @return {@link TenantResponse} */ @ApiOperation(value = "查询列表", notes = "查询列表") @GetMapping(value = "/list", produces = "application/json;charset=UTF-8") @PreAuthorize(value = "hasAnyRole('admin','superUser')") public TenantResponse list(@Sort @ApiImplicitParams(sortParam = "sort") Sort sort) { return tenantService.list(sort); } /** * 分页列表 * * @return {@link TenantResponse} */ @ApiOperation(value = "分页列表", notes = "分页列表") @GetMapping(value = "/list", produces = "application/json;charset=UTF-8") @PreAuthorize(value = "hasAnyRole('admin','superUser')") public TenantResponse list(@Pageable @ApiImplicitParams(pageableParam = "pageable") Pageable pageable) { return tenantService.list(pageable); } /** * 添加 * * @return {@link TenantResponse} */ @ApiOperation(value = "添加", notes = "添加请求的信息") @PostMapping @PreAuthorize(value = "hasRole('admin')") public TenantResponse add(Tenant tenant) { return tenantService.add(tenant); } /** * 新增 * * @return {@link TenantResponse} */ @ApiOperation(value = "新增", notes = "新增请求的信息") @PreAuthorize(value = "hasAnyRole('admin')") @PostMapping(value = "/create") public TenantResponse create() { return tenantService.create(); } /** * 修改 * * @return {@link TenantResponse} */ @ApiOperation(value = "修改", notes = "修改请求的信息") @PreAuthorize(value = "hasAnyRole('admin','superUser')") @PutMapping(value = "/update") public TenantResponse update(Tenant tenant) { return tenantService.update(tenant); } /** * 更新角色 * * @return {@link TenantResponse} */ @ApiOperation(value = "更新角色", notes = "更新角色请求的信息") @PreAuthorize(value = "hasAnyRole('admin','superUser')") @PutMapping(value = "/update-role") public TenantResponse updateRole(@RequestParam String roleId) { return tenantService.updateRole(roleId); } /** * 查询资源列表 * * @return {@link TenantResponse} */ @ApiOperation(value = "查询资源列表", notes = "查询资源列表") @PostMapping @PreAuthorize(value = "hasAnyRole('admin')") public TenantResponse listResources() { return tenantService.listResources(); } /** * 增加数据库权限 * * @return {@link TenantResponse} */ @ApiOperation(value = "增加数据库权限", notes = "增加数据库权限请求的信息") @PreAuthorize(value = "hasAnyRole('admin')") @PostMapping(value = "/create-role") public TenantResponse addRole() { return tenantService.addRole(); } /** * 查询机器信息 * * @return {@link TenantResponse} */ @ApiOperation(value = "查询机器信息", notes = "查询机器信息") @PreAuthorize(value = "hasAnyRole('admin')") @PostMapping(value = "/get-machine") public TenantResponse getMachine() { return tenantService.getMachine(); } /** * 查询机器列表 * * @return {@link TenantResponse} */ @ApiOperation(value = "查询机器列表", notes = "查询机器列表") @PreAuthorize(value = "hasAnyRole('admin')") @PostMapping(value = "/get-machines") public TenantResponse get