Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
574fe137
提交
574fe137
编写于
9月 30, 2022
作者:
chenxiang@lab.ibiz5.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NoSQL:MongoDB适配 fix
上级
098b9dd2
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
13 行增加
和
13 行删除
+13
-13
{{entities@NoSQL}}SearchContext.java.hbs
...modules}}/filter/{{entities@NoSQL}}SearchContext.java.hbs
+13
-13
未找到文件。
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/filter/{{entities@NoSQL}}SearchContext.java.hbs
浏览文件 @
574fe137
...
...
@@ -61,47 +61,47 @@ public class {{entity.codeName}}SearchContext extends MongoQueryContext {
this.
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
=
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
;
if(!ObjectUtils.isEmpty(this.
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
)){
{{#
eq
formitem
.
valueOP
"LIKE"
}}
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").regex(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").regex(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"LEFTLIKE"
}}
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").regex(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").regex(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"RIGHTLIKE"
}}
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").regex(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").regex(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"EQ"
}}
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").is(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").is(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"NOTEQ"
}}
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").ne(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").ne(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"GT"
}}
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").gt(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").gt(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"GTANDEQ"
}}
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").gte(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").gte(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"LT"
}}
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").lt(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").lt(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"LTANDEQ"
}}
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").lte(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").lte(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
));
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"ISNOTNULL"
}}
if(this.
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
.equals("1")){
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").ne(null));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").ne(null));
}
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"ISNULL"
}}
if(this.
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
.equals("1")){
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").is(null));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").is(null));
}
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"IN"
}}
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").in(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
.split(";|,|;|,")));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").in(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
.split(";|,|;|,")));
{{/
eq
}}
{{#
eq
formitem
.
valueOP
"NOTIN"
}}
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
n
ame
}}
").nin(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
.split(";|,|;|,")));
this.getSearchCond().addCriteria(Criteria.where("
{{
camelCase
field
.
codeN
ame
}}
").nin(
{{
camelCase
field
.
codeName
}}{{
formitem
.
valueOP
}}
.split(";|,|;|,")));
{{/
eq
}}
}
return this;
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录