mirror of
https://github.com/BgaSol/sol-cloud
synced 2026-05-22 16:48:22 +00:00
refactor(data-scope): Adjust the package structure related to data permissions
This commit is contained in:
parent
0b86e77bc6
commit
2c5f3becc8
5 changed files with 28 additions and 16 deletions
|
|
@ -1,12 +0,0 @@
|
|||
package com.bgasol.common.core.base.bo;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 数据权限字段注解
|
||||
*/
|
||||
@Target(ElementType.FIELD) // 只能标记字段
|
||||
@Retention(RetentionPolicy.RUNTIME) // 运行时可用
|
||||
@Documented
|
||||
public @interface ScopeField {
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@ package com.bgasol.common.core.base.handler;
|
|||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.handler.MultiDataPermissionHandler;
|
||||
import com.bgasol.common.core.base.bo.ScopeField;
|
||||
import com.bgasol.common.core.base.bo.ScopeOptionsBo;
|
||||
import com.bgasol.model.system.user.bo.ScopeField;
|
||||
import com.bgasol.model.system.user.bo.ScopeOptionsBo;
|
||||
import com.bgasol.common.core.base.entity.BaseEntity;
|
||||
import com.bgasol.common.core.base.mapper.MyBaseMapper;
|
||||
import com.bgasol.model.system.department.entity.DepartmentEntity;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
package com.bgasol.model.system.user.bo;
|
||||
|
||||
import com.bgasol.model.system.department.entity.DepartmentEntity;
|
||||
import com.bgasol.model.system.user.entity.UserEntity;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 数据权限字段注解
|
||||
* <p>
|
||||
* 只能修饰于:
|
||||
* {@link UserEntity}
|
||||
* {@link DepartmentEntity}
|
||||
* 以及其对应的列表类型:
|
||||
* {@link List}
|
||||
* <p>
|
||||
*/
|
||||
@Target(ElementType.FIELD) // 只能标记字段
|
||||
@Retention(RetentionPolicy.RUNTIME) // 运行时可用
|
||||
@Documented
|
||||
public @interface ScopeField {
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bgasol.common.core.base.bo;
|
||||
package com.bgasol.model.system.user.bo;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
@ -2,7 +2,7 @@ package com.bgasol.model.system.user.entity;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.bgasol.common.core.base.bo.ScopeField;
|
||||
import com.bgasol.model.system.user.bo.ScopeField;
|
||||
import com.bgasol.common.core.base.entity.BaseEntity;
|
||||
import com.bgasol.model.system.department.entity.DepartmentEntity;
|
||||
import com.bgasol.model.system.role.entity.RoleEntity;
|
||||
|
|
|
|||
Loading…
Reference in a new issue