diff --git a/src/main/java/com/gxwebsoft/common/system/controller/DomainController.java b/src/main/java/com/gxwebsoft/common/system/controller/DomainController.java index facd808..f633821 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/DomainController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/DomainController.java @@ -33,9 +33,9 @@ public class DomainController extends BaseController { private DomainService domainService; @ApiOperation("根据域名查询授权") - @GetMapping("/{domain}") - public ApiResult get(@PathVariable("domain") String domain) { - final Domain one = domainService.getOne(new LambdaQueryWrapper().eq(Domain::getDomain, domain).eq(Domain::getDeleted, 0)); + @GetMapping("/getByDomain") + public ApiResult get(DomainParam param) { + final Domain one = domainService.getOne(new LambdaQueryWrapper().eq(Domain::getDomain, param.getDomain()).eq(Domain::getDeleted, 0).last("limit 1")); if (ObjectUtil.isEmpty(one)) { return fail("域名未授权.",null); } @@ -61,13 +61,13 @@ public class DomainController extends BaseController { return success(domainService.listRel(param)); } -// @PreAuthorize("hasAuthority('sys:company:profile')") -// @ApiOperation("根据id查询授权域名") -// @GetMapping("/{id}") -// public ApiResult get(@PathVariable("id") Integer id) { -// // 使用关联查询 -// return success(domainService.getByIdRel(id)); -// } + @PreAuthorize("hasAuthority('sys:company:profile')") + @ApiOperation("根据id查询授权域名") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(domainService.getByIdRel(id)); + } @PreAuthorize("hasAuthority('sys:company:profile')") @OperationLog