rename likeExample to likesExample

This commit is contained in:
Timi
2025-12-25 14:57:49 +08:00
parent 1205946381
commit e0398b3a22
2 changed files with 9 additions and 9 deletions

View File

@ -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() {

View File

@ -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))