提交 903e7636 编写于 作者: zhouweidong's avatar zhouweidong

简化权限校验

上级 e065c04f
...@@ -1070,7 +1070,7 @@ ${deaction.getRender().code} ...@@ -1070,7 +1070,7 @@ ${deaction.getRender().code}
@Override @Override
public List<${de.codeName}> get${deCodeNameCamel}ByIds(List<String> ids) { public List<${de.codeName}> get${deCodeNameCamel}ByIds(List<String> ids) {
QueryBuilder permissionCond=new QueryBuilder(); QueryBuilder permissionCond=new QueryBuilder();
permissionCond.and("${keyfield?lower_case}").in(ids); permissionCond.and("${keyfield.codeName?lower_case}").in(ids);
Query query = new BasicQuery(permissionCond.get().toString()); Query query = new BasicQuery(permissionCond.get().toString());
return mongoTemplate.find(query,${de.codeName}.class); return mongoTemplate.find(query,${de.codeName}.class);
} }
...@@ -1087,7 +1087,7 @@ ${deaction.getRender().code} ...@@ -1087,7 +1087,7 @@ ${deaction.getRender().code}
} }
if(ids.size()>0){ if(ids.size()>0){
QueryBuilder permissionCond=new QueryBuilder(); QueryBuilder permissionCond=new QueryBuilder();
permissionCond.and("${keyfield?lower_case}").in(ids); permissionCond.and("${keyfield.codeName?lower_case}").in(ids);
Query query = new BasicQuery(permissionCond.get().toString()); Query query = new BasicQuery(permissionCond.get().toString());
return mongoTemplate.find(query,${de.codeName}.class); return mongoTemplate.find(query,${de.codeName}.class);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册