提交 f7bf5ecf 编写于 作者: O o2sword

已办分页查询增加根据title搜索,用户需要搜索内容只对标题搜索

上级 f30071bd
......@@ -103,6 +103,9 @@ abstract class V2Base extends StandardJaxrsAction {
@FieldDescribe("关键字")
private String key;
@FieldDescribe("标题")
private String title;
public Boolean getNotCompleted() {
return notCompleted;
}
......@@ -206,6 +209,14 @@ abstract class V2Base extends StandardJaxrsAction {
public void setLatest(Boolean latest) {
this.latest = latest;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
public static abstract class RelateFilterWi extends FilterWi {
......@@ -465,6 +476,12 @@ abstract class V2Base extends StandardJaxrsAction {
cb.like(root.get(TaskCompleted_.creatorPerson), key),
cb.like(root.get(TaskCompleted_.creatorUnit), key)));
}
if (StringUtils.isNotEmpty(wi.getTitle())) {
String title = StringTools.escapeSqlLikeKey(wi.getTitle());
if (StringUtils.isNotEmpty(title)) {
p = cb.and(cb.like(root.get(TaskCompleted_.title), "%" + title + "%"));
}
}
return p;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册