feat(REQ-2300):数据权限上下文增加缓存
This commit is contained in:
parent
2323e7a2a0
commit
0ca36efdda
@ -3,11 +3,17 @@ package cn.axzo.framework.datapermission.annotation;
|
||||
import cn.axzo.framework.datapermission.rule.OrgDefaultRule;
|
||||
import cn.axzo.framework.datapermission.rule.DataPermissionRule;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 数据权限注解
|
||||
* @author tanjie@axzo.cn
|
||||
* @date 2024/5/30 17:57
|
||||
*/
|
||||
@Inherited
|
||||
@Documented
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface DataPermission {
|
||||
boolean enable() default true;
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package cn.axzo.framework.datapermission.context;
|
||||
|
||||
import cn.axzo.framework.datapermission.annotation.DataPermission;
|
||||
import cn.axzo.karma.client.feign.tyr.response.MatchDataObjectResp;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@ -67,6 +68,11 @@ public class DataPermissionContextHolder {
|
||||
public void putPermissionData(String key, Object value) {
|
||||
permissionDataCache.put(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据权限匹配结果
|
||||
*/
|
||||
private MatchDataObjectResp matchDataObjectResp;
|
||||
}
|
||||
|
||||
public static void remove() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user