修复:根据域名查询授权

This commit is contained in:
2024-09-01 01:03:18 +08:00
parent c6d9577f86
commit c635d42fb3

View File

@@ -33,9 +33,9 @@ public class DomainController extends BaseController {
private DomainService domainService;
@ApiOperation("根据域名查询授权")
@GetMapping("/{domain}")
public ApiResult<Domain> get(@PathVariable("domain") String domain) {
final Domain one = domainService.getOne(new LambdaQueryWrapper<Domain>().eq(Domain::getDomain, domain).eq(Domain::getDeleted, 0));
@GetMapping("/getByDomain")
public ApiResult<Domain> get(DomainParam param) {
final Domain one = domainService.getOne(new LambdaQueryWrapper<Domain>().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<Domain> get(@PathVariable("id") Integer id) {
// // 使用关联查询
// return success(domainService.getByIdRel(id));
// }
@PreAuthorize("hasAuthority('sys:company:profile')")
@ApiOperation("根据id查询授权域名")
@GetMapping("/{id}")
public ApiResult<Domain> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(domainService.getByIdRel(id));
}
@PreAuthorize("hasAuthority('sys:company:profile')")
@OperationLog