Commit b0fca55d authored by xiandafu's avatar xiandafu
Browse files
parents b13f4fed f94da76b
batchDelByIds
===
update core_org set u.del_flag = 1 where u.id in( #join(ids)#);
update core_org set u.del_flag = 1 where u.id in( #join(ids)#)
queryByCondtion
===
......
......@@ -49,19 +49,19 @@ batchDelByIds
* 批量删除角色,同时也参考batchDeleteRoleFunction,batchDeleteRoleMenu等方法删除其他关联数据
delete from core_role where id in( #join(ids)#);
delete from core_role where id in( #join(ids)#)
batchDeleteRoleFunction
===
delete from core_role_function where role_id in( #join(ids)#);
delete from core_role_function where role_id in( #join(ids)#)
batchDeleteRoleMenu
===
delete from core_role_menu where role_id in( #join(ids)#);
delete from core_role_menu where role_id in( #join(ids)#)
batchDeleteUserRole
===
delete from core_user_role where role_id in( #join(ids)#);
delete from core_user_role where role_id in( #join(ids)#)
queryAllByDelflag
......
......@@ -82,7 +82,7 @@ public class DataAccessFunction implements Function {
List<Object> list = (List<Object>)ctx.getGlobal("_paras");
StringBuilder sb = new StringBuilder(" ");
StringBuilder sb = new StringBuilder("( ");
//数据权限范围划定
boolean hasAppend = false;
for(int i=0;i<roleFuns.size();i++){
......@@ -106,6 +106,7 @@ public class DataAccessFunction implements Function {
case AllOrg:{
//sql 不包含组织机构过滤信息
sb.append(" 1=1 /* AllOrg */ ");
break;
}
case OnlyUser:{
List<Long> ids = ret.getUserIds();
......@@ -164,7 +165,7 @@ public class DataAccessFunction implements Function {
}
sb.append(" ) ");
return sb.toString();
}
......
package com.ibeetl.admin.core.web.query;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ibeetl.admin.core.annotation.Query;
import org.beetl.sql.core.engine.PageQuery;
import java.lang.reflect.Field;
/**
* 子类继承此类获得翻页功能
* @author lijiazhi
......@@ -21,6 +24,26 @@ public class PageParam {
@JsonIgnore
public PageQuery getPageQuery() {
Field[] fs =this.getClass().getDeclaredFields();
for(Field f:fs){
Query query = f.getAnnotation(Query.class);
if(query==null){
continue ;
}
if (query.fuzzy()) {
try {
if ( f.getType() == String.class) {
f.setAccessible(true);
Object o = f.get(this);
if (o != null && !o.toString().isEmpty()) {
f.set(this,"%"+o.toString()+"%");
}
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
PageQuery query = new PageQuery();
query.setParas(this);
if (page != null) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment