refactor(系统设置): 优化特殊字符报错的缺陷
This commit is contained in:
parent
ffef216687
commit
4180d40a12
|
@ -14,21 +14,19 @@ import io.metersphere.commons.user.SessionUser;
|
||||||
import io.metersphere.commons.utils.PageUtils;
|
import io.metersphere.commons.utils.PageUtils;
|
||||||
import io.metersphere.commons.utils.Pager;
|
import io.metersphere.commons.utils.Pager;
|
||||||
import io.metersphere.commons.utils.SessionUtils;
|
import io.metersphere.commons.utils.SessionUtils;
|
||||||
|
import io.metersphere.dto.GroupDTO;
|
||||||
|
import io.metersphere.dto.GroupPermissionDTO;
|
||||||
|
import io.metersphere.log.annotation.MsAuditLog;
|
||||||
import io.metersphere.log.annotation.MsRequestLog;
|
import io.metersphere.log.annotation.MsRequestLog;
|
||||||
import io.metersphere.request.GroupRequest;
|
import io.metersphere.request.GroupRequest;
|
||||||
import io.metersphere.request.group.EditGroupRequest;
|
import io.metersphere.request.group.EditGroupRequest;
|
||||||
import io.metersphere.request.group.EditGroupUserRequest;
|
import io.metersphere.request.group.EditGroupUserRequest;
|
||||||
import io.metersphere.dto.GroupDTO;
|
|
||||||
import io.metersphere.dto.GroupPermissionDTO;
|
|
||||||
import io.metersphere.log.annotation.MsAuditLog;
|
|
||||||
import io.metersphere.service.GroupService;
|
import io.metersphere.service.GroupService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import jakarta.annotation.Resource;
|
||||||
import org.apache.shiro.authz.annotation.Logical;
|
import org.apache.shiro.authz.annotation.Logical;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,9 +97,9 @@ public class GroupController {
|
||||||
groupService.editGroupPermission(editGroupRequest);
|
groupService.editGroupPermission(editGroupRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/all/{userId}")
|
@PostMapping("/all")
|
||||||
@RequiresPermissions(PermissionConstants.SYSTEM_USER_READ_EDIT)
|
@RequiresPermissions(PermissionConstants.SYSTEM_USER_READ_EDIT)
|
||||||
public List<Map<String, Object>> getAllUserGroup(@PathVariable("userId") String userId) {
|
public List<Map<String, Object>> getAllUserGroup(@RequestBody String userId) {
|
||||||
return groupService.getAllUserGroup(userId);
|
return groupService.getAllUserGroup(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {get, post} from 'metersphere-frontend/src/plugins/request';
|
import { get, post } from "metersphere-frontend/src/plugins/request";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* param: {type: '', resourceId: ''}
|
* param: {type: '', resourceId: ''}
|
||||||
|
@ -6,7 +6,7 @@ import {get, post} from 'metersphere-frontend/src/plugins/request';
|
||||||
* @returns {Promise | Promise<unknown>}
|
* @returns {Promise | Promise<unknown>}
|
||||||
*/
|
*/
|
||||||
export function getUserGroupList(param) {
|
export function getUserGroupList(param) {
|
||||||
return post('/user/group/list', param);
|
return post("/user/group/list", param);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getWorkspaceMemberGroup(workspaceId, userId) {
|
export function getWorkspaceMemberGroup(workspaceId, userId) {
|
||||||
|
@ -22,7 +22,7 @@ export function getUserGroupListByPage(goPage, pageSize, param) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAllUserGroupByType(param) {
|
export function getAllUserGroupByType(param) {
|
||||||
return post('/user/group/get', param);
|
return post("/user/group/get", param);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUserGroupsByTypeAndId(type, id) {
|
export function getUserGroupsByTypeAndId(type, id) {
|
||||||
|
@ -38,19 +38,19 @@ export function delUserGroupById(groupId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUserGroupPermission(param) {
|
export function getUserGroupPermission(param) {
|
||||||
return post('/user/group/permission', param);
|
return post("/user/group/permission", param);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function modifyUserGroupPermission(param) {
|
export function modifyUserGroupPermission(param) {
|
||||||
return post('/user/group/permission/edit', param);
|
return post("/user/group/permission/edit", param);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createUserGroup(group) {
|
export function createUserGroup(group) {
|
||||||
return post('/user/group/add', group);
|
return post("/user/group/add", group);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function modifyUserGroup(group) {
|
export function modifyUserGroup(group) {
|
||||||
return post('/user/group/edit', group);
|
return post("/user/group/edit", group);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUserGroupByResourceUrlAndPage(url, goPage, pageSize, param) {
|
export function getUserGroupByResourceUrlAndPage(url, goPage, pageSize, param) {
|
||||||
|
@ -62,7 +62,7 @@ export function getUserGroupSourceByUserIdAndGroupId(userId, groupId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function modifyUserGroupMember(param) {
|
export function modifyUserGroupMember(param) {
|
||||||
return post('/user/group/edit/member', param);
|
return post("/user/group/edit/member", param);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function rmUserFromGroup(userId, groupId) {
|
export function rmUserFromGroup(userId, groupId) {
|
||||||
|
@ -70,9 +70,9 @@ export function rmUserFromGroup(userId, groupId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addUser2Group(param) {
|
export function addUser2Group(param) {
|
||||||
return post('/user/group/add/member', param);
|
return post("/user/group/add/member", param);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUserAllGroups(userId) {
|
export function getUserAllGroups(userId) {
|
||||||
return get(`/user/group/all/${userId}`);
|
return post(`/user/group/all`, userId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue