|
@@ -3,6 +3,10 @@ package com.ruoyi.web.controller.system;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+import com.alibaba.fastjson2.JSON;
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
+import com.ruoyi.common.annotation.Anonymous;
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
@@ -233,6 +237,19 @@ public class SysUserController extends BaseController
|
|
|
return ajax;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * BPM流程 根据用户编号获取授权角色
|
|
|
+ */
|
|
|
+ @Anonymous
|
|
|
+ @GetMapping("/roleKeyByUserId/{userId}")
|
|
|
+ public AjaxResult roleKeyByUserId(@PathVariable("userId") Long userId)
|
|
|
+ {
|
|
|
+ AjaxResult ajax = AjaxResult.success();
|
|
|
+ String[] strings = roleService.selectRolesKeyByUserId(userId);
|
|
|
+ ajax.put("rolesKey", JSON.toJSONString(strings));
|
|
|
+ return ajax;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 用户授权角色
|
|
|
*/
|