Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Springboot Plus
Commits
b0fca55d
You need to sign in or sign up before continuing.
Commit
b0fca55d
authored
Jun 07, 2019
by
xiandafu
Browse files
Merge branch 'master' of
https://gitee.com/xiandafu/springboot-plus
parents
b13f4fed
f94da76b
Changes
4
Hide whitespace changes
Inline
Side-by-side
admin-console/src/main/resources/sql/console/org.md
View file @
b0fca55d
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
===
...
...
admin-console/src/main/resources/sql/console/role.md
View file @
b0fca55d
...
...
@@ -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
...
...
admin-core/src/main/java/com/ibeetl/admin/core/util/beetl/DataAccessFunction.java
View file @
b0fca55d
...
...
@@ -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
();
}
...
...
admin-core/src/main/java/com/ibeetl/admin/core/web/query/PageParam.java
View file @
b0fca55d
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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment