| | |
| | | */
|
| | | public static final String DATA_SCOPE_SELF = "5";
|
| | |
|
| | | /**
|
| | | * 数据权限过滤关键字
|
| | | */
|
| | | public static final String DATA_SCOPE = "dataScope";
|
| | |
|
| | | // 配置织入点
|
| | | @Pointcut("@annotation(com.ruoyi.framework.aspectj.lang.annotation.DataScope)")
|
| | | public void dataScopePointCut()
|
| | |
| | | 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) + ")");
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | /** 备注 */
|
| | | private String remark;
|
| | |
|
| | | /** 数据权限 */
|
| | | private String dataScope;
|
| | |
|
| | | /** 开始时间 */
|
| | | @JsonIgnore
|
| | | private String beginTime;
|
| | |
| | | public void setRemark(String remark)
|
| | | {
|
| | | this.remark = remark;
|
| | | }
|
| | |
|
| | | public String getDataScope()
|
| | | {
|
| | | return dataScope;
|
| | | }
|
| | |
|
| | | public void setDataScope(String dataScope)
|
| | | {
|
| | | this.dataScope = dataScope;
|
| | | }
|
| | |
|
| | | public String getBeginTime()
|
| | |
| | | AND status = #{status}
|
| | | </if>
|
| | | <!-- 数据范围过滤 -->
|
| | | ${dataScope}
|
| | | ${params.dataScope}
|
| | | order by d.parent_id, d.order_num
|
| | | </select>
|
| | |
|
| | |
| | | and date_format(r.create_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
| | | </if>
|
| | | <!-- 数据范围过滤 -->
|
| | | ${dataScope}
|
| | | ${params.dataScope}
|
| | | order by r.role_sort
|
| | | </select>
|
| | |
|
| | |
| | | AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET (#{deptId},ancestors) ))
|
| | | </if>
|
| | | <!-- 数据范围过滤 -->
|
| | | ${dataScope}
|
| | | ${params.dataScope}
|
| | | </select>
|
| | |
|
| | | <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
|