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
Eladmin
Commits
e1c434b8
Commit
e1c434b8
authored
Mar 20, 2021
by
Zheng Jie
Browse files
[代码优化](v2.6):@Query 加入 NOT_IN 查询
parent
8c6571f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
eladmin-common/src/main/java/me/zhengjie/annotation/Query.java
View file @
e1c434b8
...
@@ -65,6 +65,8 @@ public @interface Query {
...
@@ -65,6 +65,8 @@ public @interface Query {
,
LESS_THAN_NQ
,
LESS_THAN_NQ
// jie 2019/6/4 包含
// jie 2019/6/4 包含
,
IN
,
IN
// 不包含
,
NOT_IN
// 不等于
// 不等于
,
NOT_EQUAL
,
NOT_EQUAL
// between
// between
...
...
eladmin-common/src/main/java/me/zhengjie/utils/QueryHelp.java
View file @
e1c434b8
...
@@ -141,8 +141,13 @@ public class QueryHelp {
...
@@ -141,8 +141,13 @@ public class QueryHelp {
.
as
(
String
.
class
),
val
.
toString
()
+
"%"
));
.
as
(
String
.
class
),
val
.
toString
()
+
"%"
));
break
;
break
;
case
IN:
case
IN:
if
(
CollUtil
.
isNotEmpty
((
Collection
<
Long
>)
val
))
{
if
(
CollUtil
.
isNotEmpty
((
Collection
<
Object
>)
val
))
{
list
.
add
(
getExpression
(
attributeName
,
join
,
root
).
in
((
Collection
<
Long
>)
val
));
list
.
add
(
getExpression
(
attributeName
,
join
,
root
).
in
((
Collection
<
Object
>)
val
));
}
break
;
case
NOT_IN:
if
(
CollUtil
.
isNotEmpty
((
Collection
<
Object
>)
val
))
{
list
.
add
(
getExpression
(
attributeName
,
join
,
root
).
in
((
Collection
<
Object
>)
val
).
not
());
}
}
break
;
break
;
case
NOT_EQUAL:
case
NOT_EQUAL:
...
...
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