Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 mvel 对 Integer 参数的判断 #12

Closed
masankin opened this issue Mar 8, 2020 · 1 comment
Closed

关于 mvel 对 Integer 参数的判断 #12

masankin opened this issue Mar 8, 2020 · 1 comment

Comments

@masankin
Copy link

masankin commented Mar 8, 2020

@QueryFenix(nativeQuery = true)
List<User> queryList(Integer status);

<andEqual field="t.status" value="status" match="?status != empty" />

status 为 null 或 0 判断都一样 , 这个有什么好的解决方法吗

@blinkfox
Copy link
Owner

blinkfox commented Mar 8, 2020

@masankin empty是空的含义,比 null 的空的含义更广,根据具体的类型的不同,也会有些不同意义的空值。如果你想只判断 null 情况的化,那你直接写成 ?status != null 就行。

@masankin masankin closed this as completed Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants