mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud.git
synced 2025-09-03 19:27:59 +00:00
数据范围过滤属性调整
This commit is contained in:
@@ -36,9 +36,6 @@ public class BaseEntity implements Serializable
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 数据权限 */
|
||||
private String dataScope;
|
||||
|
||||
/** 开始时间 */
|
||||
@JsonIgnore
|
||||
private String beginTime;
|
||||
@@ -110,16 +107,6 @@ public class BaseEntity implements Serializable
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getDataScope()
|
||||
{
|
||||
return dataScope;
|
||||
}
|
||||
|
||||
public void setDataScope(String dataScope)
|
||||
{
|
||||
this.dataScope = dataScope;
|
||||
}
|
||||
|
||||
public String getBeginTime()
|
||||
{
|
||||
return beginTime;
|
||||
|
@@ -51,6 +51,11 @@ public class DataScopeAspect
|
||||
*/
|
||||
public static final String DATA_SCOPE_SELF = "5";
|
||||
|
||||
/**
|
||||
* 数据权限过滤关键字
|
||||
*/
|
||||
public static final String DATA_SCOPE = "dataScope";
|
||||
|
||||
@Autowired
|
||||
private AwaitUserService awaitUserService;
|
||||
|
||||
@@ -140,7 +145,7 @@ public class DataScopeAspect
|
||||
if (StringUtils.isNotBlank(sqlString.toString()))
|
||||
{
|
||||
BaseEntity baseEntity = (BaseEntity) joinPoint.getArgs()[0];
|
||||
baseEntity.setDataScope(" AND (" + sqlString.substring(4) + ")");
|
||||
baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user