安全组相关接口url调整
This commit is contained in:
@@ -4,14 +4,14 @@ const baseUri = '/security';
|
||||
|
||||
export function fetchGroupList() {
|
||||
return request({
|
||||
url: `${baseUri}/group/s`,
|
||||
url: `${baseUri}/group/list`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchGroupOne(groupId) {
|
||||
return request({
|
||||
url: `${baseUri}/group/getOne?groupId=${groupId}`,
|
||||
url: `${baseUri}/group/detail?groupId=${groupId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -55,7 +55,7 @@ export function disableGroup(groupId) {
|
||||
|
||||
export function fetchRuleList(groupId) {
|
||||
return request({
|
||||
url: `${baseUri}/rule/s?groupId=${groupId}`,
|
||||
url: `${baseUri}/rule/list?groupId=${groupId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -94,4 +94,4 @@ export function disableRule(ruleId) {
|
||||
url: `${baseUri}/rule/disable?ruleId=${ruleId}`,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -30,14 +30,14 @@ public class SecurityController {
|
||||
* 获取当前用户权限下的安全组
|
||||
*/
|
||||
@Get
|
||||
@Mapping("/group/s")
|
||||
public List<SecurityGroupRes> getGroups() {
|
||||
@Mapping("/group/list")
|
||||
public List<SecurityGroupRes> groupList() {
|
||||
List<SecurityGroupDO> groupDOList = groupService.queryGroupList();
|
||||
return groupDOList.stream().map(SecurityGroupDO::toRes).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Get
|
||||
@Mapping("/group/getOne")
|
||||
@Mapping("/group/detail")
|
||||
public SecurityGroupRes getGroupOne(Integer groupId) {
|
||||
return groupService.queryGroupOne(groupId).toRes();
|
||||
}
|
||||
@@ -77,8 +77,8 @@ public class SecurityController {
|
||||
}
|
||||
|
||||
@Get
|
||||
@Mapping("/rule/s")
|
||||
public List<SecurityRuleRes> getRulesByGroupId(Integer groupId) {
|
||||
@Mapping("/rule/list")
|
||||
public List<SecurityRuleRes> getRuleListByGroupId(Integer groupId) {
|
||||
List<SecurityRuleDO> ruleDOList = groupService.queryRuleListByGroupId(groupId);
|
||||
return ruleDOList.stream().map(SecurityRuleDO::toRes).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user