fix 修复 数据权限远程传输报错问题

This commit is contained in:
疯狂的狮子Li
2026-08-19 14:26:42 +08:00
parent 3321a96a19
commit fbbed3905a
@@ -100,12 +100,15 @@ public class DataPermissionHelper {
* @throws NullPointerException 如果数据权限上下文类型异常,则抛出NullPointerException
*/
public static Map<String, Object> getContext() {
Object attribute = new HashMap<>();
if (SaHolder.getContext().isValid()) {
SaStorage saStorage = SaHolder.getStorage();
Object attribute = saStorage.get(DATA_PERMISSION_KEY);
attribute = saStorage.get(DATA_PERMISSION_KEY);
if (ObjectUtil.isNull(attribute)) {
saStorage.set(DATA_PERMISSION_KEY, new HashMap<>());
attribute = saStorage.get(DATA_PERMISSION_KEY);
}
}
if (attribute instanceof Map map) {
return map;
}