@ -11,6 +11,7 @@ import apelet.common.online.model.constant.DataRuleType;
@@ -11,6 +11,7 @@ import apelet.common.online.model.constant.DataRuleType;
import apelet.common.online.model.constant.FieldFilterType ;
import apelet.common.online.model.constant.RelationType ;
import apelet.common.orm.impl.* ;
import apelet.common.orm.parser.FilterParser ;
import cn.hutool.core.collection.CollUtil ;
import cn.hutool.core.util.StrUtil ;
import com.alibaba.fastjson.JSON ;
@ -62,7 +63,7 @@ public class ListDataOrmService extends ListDataService {
@@ -62,7 +63,7 @@ public class ListDataOrmService extends ListDataService {
OnlineTable masterTable = datasourceResult . getData ( ) . getMasterTable ( ) ;
OnlineForm onlineForm = onlineFormService . getOnlineFormFromCache ( dto . getFormId ( ) ) ;
// 根据 metaCode 过滤权限规则:非空→基础数据权限,为空→列表权限
List < PermissionDataRuleSchema > ruleSchemaList = permissionDataRuleSchemaService . listByFormId ( online Form . getForm Id ( ) ) ;
List < PermissionDataRuleSchema > ruleSchemaList = permissionDataRuleSchemaService . listByFormId ( onlFormHead . getId ( ) ) ;
String conditionExpression = null ;
if ( CollUtil . isNotEmpty ( ruleSchemaList ) ) {
List < PermissionDataRuleSchema > filtered = new ArrayList < > ( ) ;
@ -83,7 +84,12 @@ public class ListDataOrmService extends ListDataService {
@@ -83,7 +84,12 @@ public class ListDataOrmService extends ListDataService {
getOrmSelector ( widgetList , selectorSet , masterTable , new HashMap < > ( ) ) ;
Filter filter = getFilter ( ) ;
if ( StrUtil . isNotBlank ( conditionExpression ) ) {
//todo 这里调用 过滤器
Filter parsed = FilterParser . parse ( conditionExpression ) ;
if ( CollUtil . isNotEmpty ( parsed . getItems ( ) ) ) {
for ( FilterItem item : parsed . getItems ( ) ) {
filter . add ( item ) ;
}
}
}
Sorter sorter = new Sorter ( ) ;