From c635d42fb35080762c811a3373f6c630f9d75f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Sun, 1 Sep 2024 01:03:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=9F=9F=E5=90=8D=E6=9F=A5=E8=AF=A2=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/DomainController.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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