|
@@ -1,41 +0,0 @@
|
|
|
-package com.ruoyi.common.utils;
|
|
|
-
|
|
|
-import com.alibaba.fastjson2.JSON;
|
|
|
-import com.alibaba.fastjson2.JSONArray;
|
|
|
-import com.alibaba.fastjson2.JSONObject;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-import org.springframework.web.client.RestTemplate;
|
|
|
-
|
|
|
-import java.sql.Array;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-/**
|
|
|
- * @author lucky
|
|
|
- * @date 2023-11-02 15:29
|
|
|
- * @Description:
|
|
|
- */
|
|
|
-@Component
|
|
|
-public class BpmUtils {
|
|
|
-
|
|
|
-
|
|
|
- // 查询字典中的基础库模版信息
|
|
|
- @Value("${parameter.ip.MAIN_ROLESKEY_IP}")
|
|
|
- private String rolesKeyId;
|
|
|
-
|
|
|
- /**
|
|
|
- * 根据用户查询角色key
|
|
|
- * @param userId
|
|
|
- * @return
|
|
|
- */
|
|
|
- public String[] getRoleKeyByUserId(Long userId){
|
|
|
- RestTemplate restTemplate = new RestTemplate();
|
|
|
- String ret = restTemplate.getForObject(rolesKeyId+userId,String.class);
|
|
|
- JSONObject jsonObject = JSONObject.parseObject(ret);
|
|
|
- String s = (String) jsonObject.get("rolesKey");
|
|
|
- String[] strings = JSONObject.parseObject(s, String[].class);
|
|
|
- return strings;
|
|
|
- }
|
|
|
-}
|