|
|
@@ -77,13 +77,13 @@ public class DatePermissionInterceptor implements Interceptor {
|
|
77
|
77
|
}
|
|
78
|
78
|
if(orgId!=null && !"10".equals(orgId)) {
|
|
79
|
79
|
//机构单独查询时使用递归查询,可以查询机构下级机构
|
|
80
|
|
- if("com.chinaitop.depot.system.mapper.OrgInfoMapper.selectByExample".equals(mappedStatement.getId())) {
|
|
|
80
|
+ /*if("com.chinaitop.depot.system.mapper.OrgInfoMapper.selectByExample".equals(mappedStatement.getId())) {
|
|
81
|
81
|
bouString = bouString.replaceAll("org_info", "(SELECT * from org_info"
|
|
82
|
82
|
+ " WHERE FIND_IN_SET(org_id,getChildrenOrg("+orgId+"))) org_info ");
|
|
83
|
83
|
//gbase8s使用
|
|
84
|
|
- /*bouString = bouString.replaceAll("org_info", "(SELECT * from org_info"
|
|
85
|
|
- + " start with org_id="+orgId+" connect by prior org_id = parent_id) org_info ");*/
|
|
86
|
|
- }else {
|
|
|
84
|
+ bouString = bouString.replaceAll("org_info", "(SELECT * from org_info"
|
|
|
85
|
+ + " start with org_id="+orgId+" connect by prior org_id = parent_id) org_info ");
|
|
|
86
|
+ }else {*/
|
|
87
|
87
|
//解析sql中的表名
|
|
88
|
88
|
Statement statement = CCJSqlParserUtil.parse(bouString);
|
|
89
|
89
|
Select selectStatement = (Select)statement;
|
|
|
@@ -122,7 +122,7 @@ public class DatePermissionInterceptor implements Interceptor {
|
|
122
|
122
|
+ " b,user_business u WHERE b.org_id = u.org_id AND u .user_id ='"+userId+"' AND u.business_type = '"+table+"') ");*/
|
|
123
|
123
|
|
|
124
|
124
|
}
|
|
125
|
|
- }
|
|
|
125
|
+ //}
|
|
126
|
126
|
|
|
127
|
127
|
|
|
128
|
128
|
//metaStatementHandler.setValue("delegate.boundSql.sql", bouString);
|