rename likeExample to likesExample
This commit is contained in:
@ -17,7 +17,7 @@ public class Page<T> extends BasePage {
|
|||||||
|
|
||||||
protected T equalsExample;
|
protected T equalsExample;
|
||||||
|
|
||||||
protected T likeExample;
|
protected T likesExample;
|
||||||
|
|
||||||
protected LinkedHashMap<String, BaseMapper.OrderType> orderMap;
|
protected LinkedHashMap<String, BaseMapper.OrderType> orderMap;
|
||||||
|
|
||||||
@ -44,12 +44,12 @@ public class Page<T> extends BasePage {
|
|||||||
this.equalsExample = equalsExample;
|
this.equalsExample = equalsExample;
|
||||||
}
|
}
|
||||||
|
|
||||||
public T getLikeExample() {
|
public T getLikesExample() {
|
||||||
return likeExample;
|
return likesExample;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLikeExample(T likeExample) {
|
public void setLikesExample(T likesExample) {
|
||||||
this.likeExample = likeExample;
|
this.likesExample = likesExample;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LinkedHashMap<String, BaseMapper.OrderType> getOrderMap() {
|
public LinkedHashMap<String, BaseMapper.OrderType> getOrderMap() {
|
||||||
|
|||||||
@ -69,9 +69,9 @@ public class SQLProvider {
|
|||||||
.collect(Collectors.joining(" AND "));
|
.collect(Collectors.joining(" AND "));
|
||||||
sql.append(" AND ").append(conditionClause);
|
sql.append(" AND ").append(conditionClause);
|
||||||
}
|
}
|
||||||
if (TimiJava.isNotEmpty(page.getLikeExample())) {
|
if (TimiJava.isNotEmpty(page.getLikesExample())) {
|
||||||
// 模糊查询
|
// 模糊查询
|
||||||
Object obj = page.getLikeExample();
|
Object obj = page.getLikesExample();
|
||||||
EntityMeta metaExample = getEntityMeta(obj.getClass());
|
EntityMeta metaExample = getEntityMeta(obj.getClass());
|
||||||
String conditionClause = metaExample.fieldColumnList.stream()
|
String conditionClause = metaExample.fieldColumnList.stream()
|
||||||
.filter(fc -> fc.isNotNull(obj))
|
.filter(fc -> fc.isNotNull(obj))
|
||||||
@ -127,9 +127,9 @@ public class SQLProvider {
|
|||||||
.collect(Collectors.joining(" AND "));
|
.collect(Collectors.joining(" AND "));
|
||||||
sql.append(" AND ").append(conditionClause);
|
sql.append(" AND ").append(conditionClause);
|
||||||
}
|
}
|
||||||
if (TimiJava.isNotEmpty(page.getLikeExample())) {
|
if (TimiJava.isNotEmpty(page.getLikesExample())) {
|
||||||
// 模糊查询
|
// 模糊查询
|
||||||
Object obj = page.getLikeExample();
|
Object obj = page.getLikesExample();
|
||||||
EntityMeta metaExample = getEntityMeta(obj.getClass());
|
EntityMeta metaExample = getEntityMeta(obj.getClass());
|
||||||
String conditionClause = metaExample.fieldColumnList.stream()
|
String conditionClause = metaExample.fieldColumnList.stream()
|
||||||
.filter(fc -> fc.isNotNull(obj))
|
.filter(fc -> fc.isNotNull(obj))
|
||||||
|
|||||||
Reference in New Issue
Block a user