修复:根据域名查询授权
This commit is contained in:
@@ -33,9 +33,9 @@ public class DomainController extends BaseController {
|
|||||||
private DomainService domainService;
|
private DomainService domainService;
|
||||||
|
|
||||||
@ApiOperation("根据域名查询授权")
|
@ApiOperation("根据域名查询授权")
|
||||||
@GetMapping("/{domain}")
|
@GetMapping("/getByDomain")
|
||||||
public ApiResult<Domain> get(@PathVariable("domain") String domain) {
|
public ApiResult<Domain> get(DomainParam param) {
|
||||||
final Domain one = domainService.getOne(new LambdaQueryWrapper<Domain>().eq(Domain::getDomain, domain).eq(Domain::getDeleted, 0));
|
final Domain one = domainService.getOne(new LambdaQueryWrapper<Domain>().eq(Domain::getDomain, param.getDomain()).eq(Domain::getDeleted, 0).last("limit 1"));
|
||||||
if (ObjectUtil.isEmpty(one)) {
|
if (ObjectUtil.isEmpty(one)) {
|
||||||
return fail("域名未授权.",null);
|
return fail("域名未授权.",null);
|
||||||
}
|
}
|
||||||
@@ -61,13 +61,13 @@ public class DomainController extends BaseController {
|
|||||||
return success(domainService.listRel(param));
|
return success(domainService.listRel(param));
|
||||||
}
|
}
|
||||||
|
|
||||||
// @PreAuthorize("hasAuthority('sys:company:profile')")
|
@PreAuthorize("hasAuthority('sys:company:profile')")
|
||||||
// @ApiOperation("根据id查询授权域名")
|
@ApiOperation("根据id查询授权域名")
|
||||||
// @GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
// public ApiResult<Domain> get(@PathVariable("id") Integer id) {
|
public ApiResult<Domain> get(@PathVariable("id") Integer id) {
|
||||||
// // 使用关联查询
|
// 使用关联查询
|
||||||
// return success(domainService.getByIdRel(id));
|
return success(domainService.getByIdRel(id));
|
||||||
// }
|
}
|
||||||
|
|
||||||
@PreAuthorize("hasAuthority('sys:company:profile')")
|
@PreAuthorize("hasAuthority('sys:company:profile')")
|
||||||
@OperationLog
|
@OperationLog
|
||||||
|
|||||||
Reference in New Issue
Block a user