| | |
| | | package com.matrix.system.app.authority; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | |
| | | String redisKey = USER_POWER_REDISKEY_APP + SecureUtil.md5(user.getSuId()+""); |
| | | Map<String, Object> cachePowerMap = LocalCache.get(redisKey); |
| | | if (Objects.nonNull(cachePowerMap)) { |
| | | |
| | | userFunction = (Map<String, SysFunction>) cachePowerMap.get(USERFUNCTION); |
| | | |
| | | userUrlMapping = (List<String>) cachePowerMap.get(USER_URL_MAPPING); |
| | | userFunction = JSONObject.parseObject(JSON.toJSONString( cachePowerMap.get(USERFUNCTION)), new TypeReference<Map<String, SysFunction>>(){}); |
| | | userUrlMapping =JSONObject.parseObject(JSON.toJSONString( cachePowerMap.get(USER_URL_MAPPING)) , new TypeReference<List<String>>(){}); |
| | | |
| | | } else { |
| | | // 获取用户所有权限 |