|
@@ -1,6 +1,8 @@
|
|
|
package com.ruoyi.web.controller.system;
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
@@ -270,8 +272,11 @@ public class SysRoleController extends BaseController
|
|
|
/**
|
|
|
* 根据角色权限字符查询该角色下是否存在真实用户
|
|
|
*/
|
|
|
- @GetMapping("/selectUserByRoleKey")
|
|
|
- public AjaxResult selectUserByRoleKey(String roleKeys){
|
|
|
- return AjaxResult.success(roleService.selectUserByRoleKey((List<String>) JSON.parse(roleKeys)));
|
|
|
+ @GetMapping("/selectUserByRoleKey/{roleKeys}")
|
|
|
+ public AjaxResult selectUserByRoleKey(@PathVariable("roleKeys") String roleKeys){
|
|
|
+ String[] roleKeysArray = roleKeys.split(",");
|
|
|
+ List<String> roleKeysList = Arrays.stream(roleKeysArray)
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ return AjaxResult.success(roleService.selectUserByRoleKey(roleKeysList));
|
|
|
}
|
|
|
}
|