diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCategoryExample.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCategoryExample.java index 697fec0..f4e6908 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCategoryExample.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCategoryExample.java @@ -4,46 +4,58 @@ import java.util.ArrayList; import java.util.List; public class CmsSubjectCategoryExample { + // 定义一个用于排序的子句 protected String orderByClause; + // 定义一个布尔值,用于指示查询是否使用 DISTINCT 关键字 protected boolean distinct; + // 定义一个 Criteria 对象的列表,用于存储查询条件 protected List oredCriteria; + // 构造函数,初始化 oredCriteria 列表 public CmsSubjectCategoryExample() { oredCriteria = new ArrayList<>(); } + // 设置排序子句的方法 public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } + // 获取排序子句的方法 public String getOrderByClause() { return orderByClause; } + // 设置是否使用 DISTINCT 关键字的方法 public void setDistinct(boolean distinct) { this.distinct = distinct; } + // 获取是否使用 DISTINCT 关键字的方法 public boolean isDistinct() { return distinct; } + // 获取 Criteria 对象列表的方法 public List getOredCriteria() { return oredCriteria; } + // 将一个 Criteria 对象添加到 oredCriteria 列表中的方法 public void or(Criteria criteria) { oredCriteria.add(criteria); } + // 创建一个新的 Criteria 对象并添加到 oredCriteria 列表中的方法 public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } + // 创建一个新的 Criteria 对象,如果 oredCriteria 列表为空则将其添加到列表中的方法 public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { @@ -52,37 +64,46 @@ public class CmsSubjectCategoryExample { return criteria; } + // 内部方法,用于创建一个新的 Criteria 对象 protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } + // 清除所有查询条件和排序子句的方法 public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } + protected abstract static class GeneratedCriteria { + // 定义一个受保护的列表,用于存储查询条件 protected List criteria; + // 构造函数,初始化criteria列表 protected GeneratedCriteria() { super(); criteria = new ArrayList<>(); } + // 检查是否有有效的查询条件 public boolean isValid() { return criteria.size() > 0; } + // 获取所有的查询条件 public List getAllCriteria() { return criteria; } + // 获取当前的查询条件列表 public List getCriteria() { return criteria; } + // 添加一个简单的查询条件(例如 "id is null") protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); @@ -90,6 +111,7 @@ public class CmsSubjectCategoryExample { criteria.add(new Criterion(condition)); } + // 添加一个带值的查询条件(例如 "id = 1") protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); @@ -97,6 +119,7 @@ public class CmsSubjectCategoryExample { criteria.add(new Criterion(condition, value)); } + // 添加一个范围查询条件(例如 "id between 1 and 10") protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); @@ -104,6 +127,7 @@ public class CmsSubjectCategoryExample { criteria.add(new Criterion(condition, value1, value2)); } + // 以下方法用于生成具体的查询条件,例如 id 和 name 的条件判断 public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; @@ -254,292 +278,381 @@ public class CmsSubjectCategoryExample { return (Criteria) this; } + + // 检查icon字段是否大于给定值 public Criteria andIconGreaterThan(String value) { addCriterion("icon >", value, "icon"); return (Criteria) this; } + // 检查icon字段是否大于或等于给定值 public Criteria andIconGreaterThanOrEqualTo(String value) { addCriterion("icon >=", value, "icon"); return (Criteria) this; } + // 检查icon字段是否小于给定值 public Criteria andIconLessThan(String value) { addCriterion("icon <", value, "icon"); return (Criteria) this; } + // 检查icon字段是否小于或等于给定值 public Criteria andIconLessThanOrEqualTo(String value) { addCriterion("icon <=", value, "icon"); return (Criteria) this; } + // 检查icon字段是否匹配给定的模式(使用SQL的LIKE操作符) public Criteria andIconLike(String value) { addCriterion("icon like", value, "icon"); return (Criteria) this; } + // 检查icon字段是否不匹配给定的模式(使用SQL的NOT LIKE操作符) public Criteria andIconNotLike(String value) { addCriterion("icon not like", value, "icon"); return (Criteria) this; } + // 检查icon字段是否在给定的值列表中 public Criteria andIconIn(List values) { addCriterion("icon in", values, "icon"); return (Criteria) this; } + // 检查icon字段是否不在给定的值列表中 public Criteria andIconNotIn(List values) { addCriterion("icon not in", values, "icon"); return (Criteria) this; } + // 检查icon字段是否在给定的两个值之间 public Criteria andIconBetween(String value1, String value2) { addCriterion("icon between", value1, value2, "icon"); return (Criteria) this; } + // 检查icon字段是否不在给定的两个值之间 public Criteria andIconNotBetween(String value1, String value2) { addCriterion("icon not between", value1, value2, "icon"); return (Criteria) this; } + // 检查subject_count字段是否为空 public Criteria andSubjectCountIsNull() { addCriterion("subject_count is null"); return (Criteria) this; } + // 检查subject_count字段是否不为空 public Criteria andSubjectCountIsNotNull() { addCriterion("subject_count is not null"); return (Criteria) this; } + // 检查subject_count字段是否等于给定值 public Criteria andSubjectCountEqualTo(Integer value) { addCriterion("subject_count =", value, "subjectCount"); return (Criteria) this; } + // 检查subject_count字段是否不等于给定值 public Criteria andSubjectCountNotEqualTo(Integer value) { addCriterion("subject_count <>", value, "subjectCount"); return (Criteria) this; } + // 检查subject_count字段是否大于给定值 public Criteria andSubjectCountGreaterThan(Integer value) { addCriterion("subject_count >", value, "subjectCount"); return (Criteria) this; } + // 检查subject_count字段是否大于或等于给定值 public Criteria andSubjectCountGreaterThanOrEqualTo(Integer value) { addCriterion("subject_count >=", value, "subjectCount"); return (Criteria) this; } + // 检查subject_count字段是否小于给定值 public Criteria andSubjectCountLessThan(Integer value) { addCriterion("subject_count <", value, "subjectCount"); return (Criteria) this; } + // 检查subject_count字段是否小于或等于给定值 public Criteria andSubjectCountLessThanOrEqualTo(Integer value) { addCriterion("subject_count <=", value, "subjectCount"); return (Criteria) this; } + // 检查subject_count字段是否在给定的值列表中 public Criteria andSubjectCountIn(List values) { addCriterion("subject_count in", values, "subjectCount"); return (Criteria) this; } + // 检查subject_count字段是否不在给定的值列表中 public Criteria andSubjectCountNotIn(List values) { addCriterion("subject_count not in", values, "subjectCount"); return (Criteria) this; } + // 检查subject_count字段是否在给定的两个值之间 public Criteria andSubjectCountBetween(Integer value1, Integer value2) { addCriterion("subject_count between", value1, value2, "subjectCount"); return (Criteria) this; } + // 检查subject_count字段是否不在给定的两个值之间 public Criteria andSubjectCountNotBetween(Integer value1, Integer value2) { addCriterion("subject_count not between", value1, value2, "subjectCount"); return (Criteria) this; } + // 检查show_status字段是否为空 public Criteria andShowStatusIsNull() { addCriterion("show_status is null"); return (Criteria) this; } + // 检查show_status字段是否不为空 public Criteria andShowStatusIsNotNull() { addCriterion("show_status is not null"); return (Criteria) this; } + // 检查show_status字段是否等于给定值 public Criteria andShowStatusEqualTo(Integer value) { addCriterion("show_status =", value, "showStatus"); return (Criteria) this; } + // 检查show_status字段是否不等于给定值 public Criteria andShowStatusNotEqualTo(Integer value) { addCriterion("show_status <>", value, "showStatus"); return (Criteria) this; } + // 检查show_status字段是否大于给定值 public Criteria andShowStatusGreaterThan(Integer value) { addCriterion("show_status >", value, "showStatus"); return (Criteria) this; } + // 检查show_status字段是否大于或等于给定值 public Criteria andShowStatusGreaterThanOrEqualTo(Integer value) { addCriterion("show_status >=", value, "showStatus"); return (Criteria) this; } + // 检查show_status字段是否小于给定值 public Criteria andShowStatusLessThan(Integer value) { addCriterion("show_status <", value, "showStatus"); return (Criteria) this; } + // 检查show_status字段是否小于或等于给定值 public Criteria andShowStatusLessThanOrEqualTo(Integer value) { addCriterion("show_status <=", value, "showStatus"); return (Criteria) this; } + // 检查show_status字段是否在给定的值列表中 public Criteria andShowStatusIn(List values) { addCriterion("show_status in", values, "showStatus"); return (Criteria) this; } + // 检查show_status字段是否不在给定的值列表中 public Criteria andShowStatusNotIn(List values) { addCriterion("show_status not in", values, "showStatus"); return (Criteria) this; } + // 检查show_status字段是否在给定的两个值之间 public Criteria andShowStatusBetween(Integer value1, Integer value2) { addCriterion("show_status between", value1, value2, "showStatus"); return (Criteria) this; } + // 检查show_status字段是否不在给定的两个值之间 public Criteria andShowStatusNotBetween(Integer value1, Integer value2) { addCriterion("show_status not between", value1, value2, "showStatus"); return (Criteria) this; } + // 检查sort字段是否为空 public Criteria andSortIsNull() { addCriterion("sort is null"); return (Criteria) this; } + // 检查sort字段是否不为空 public Criteria andSortIsNotNull() { addCriterion("sort is not null"); return (Criteria) this; } + // 检查sort字段是否等于给定值 public Criteria andSortEqualTo(Integer value) { addCriterion("sort =", value, "sort"); return (Criteria) this; } + // 检查sort字段是否不等于给定值 public Criteria andSortNotEqualTo(Integer value) { addCriterion("sort <>", value, "sort"); return (Criteria) this; } + // 检查sort字段是否大于给定值 public Criteria andSortGreaterThan(Integer value) { addCriterion("sort >", value, "sort"); return (Criteria) this; } + + /** + * 添加一个条件,要求 'sort' 字段的值必须大于或等于指定的值。 + * + * @param value 要比较的值 + * @return 当前的 Criteria 实例 + */ public Criteria andSortGreaterThanOrEqualTo(Integer value) { addCriterion("sort >=", value, "sort"); return (Criteria) this; } + /** + * 添加一个条件,要求 'sort' 字段的值必须小于指定的值。 + * + * @param value 要比较的值 + * @return 当前的 Criteria 实例 + */ public Criteria andSortLessThan(Integer value) { addCriterion("sort <", value, "sort"); return (Criteria) this; } + /** + * 添加一个条件,要求 'sort' 字段的值必须小于或等于指定的值。 + * + * @param value 要比较的值 + * @return 当前的 Criteria 实例 + */ public Criteria andSortLessThanOrEqualTo(Integer value) { addCriterion("sort <=", value, "sort"); return (Criteria) this; } + /** + * 添加一个条件,要求 'sort' 字段的值必须在指定的列表中。 + * + * @param values 要匹配的值的列表 + * @return 当前的 Criteria 实例 + */ public Criteria andSortIn(List values) { addCriterion("sort in", values, "sort"); return (Criteria) this; } + /** + * 添加一个条件,要求 'sort' 字段的值不必须在指定的列表中。 + * + * @param values 要排除的值的列表 + * @return 当前的 Criteria 实例 + */ public Criteria andSortNotIn(List values) { addCriterion("sort not in", values, "sort"); return (Criteria) this; } + /** + * 添加一个条件,要求 'sort' 字段的值在指定的范围内(包含边界)。 + * + * @param value1 范围的起始值 + * @param value2 范围的结束值 + * @return 当前的 Criteria 实例 + */ public Criteria andSortBetween(Integer value1, Integer value2) { addCriterion("sort between", value1, value2, "sort"); return (Criteria) this; } + /** + * 添加一个条件,要求 'sort' 字段的值不在指定的范围内(包含边界)。 + * + * @param value1 范围的起始值 + * @param value2 范围的结束值 + * @return 当前的 Criteria 实例 + */ public Criteria andSortNotBetween(Integer value1, Integer value2) { addCriterion("sort not between", value1, value2, "sort"); return (Criteria) this; } + } public static class Criteria extends GeneratedCriteria { + // 构造函数,初始化Criteria对象 protected Criteria() { super(); } } public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - + private String condition; // 条件表达式 + private Object value; // 条件对应的值 + private Object secondValue; // 第二个值,用于between查询 + private boolean noValue; // 是否没有值 + private boolean singleValue; // 是否为单一值 + private boolean betweenValue; // 是否为区间值 + private boolean listValue; // 是否为列表值 + private String typeHandler; // 类型处理器 + + // 获取条件表达式 public String getCondition() { return condition; } + // 获取条件对应的值 public Object getValue() { return value; } + // 获取第二个值 public Object getSecondValue() { return secondValue; } + // 判断是否没有值 public boolean isNoValue() { return noValue; } + // 判断是否为单一值 public boolean isSingleValue() { return singleValue; } + // 判断是否为区间值 public boolean isBetweenValue() { return betweenValue; } + // 判断是否为列表值 public boolean isListValue() { return listValue; } + // 获取类型处理器 public String getTypeHandler() { return typeHandler; } + // 构造函数,仅包含条件表达式 protected Criterion(String condition) { super(); this.condition = condition; @@ -547,33 +660,38 @@ public class CmsSubjectCategoryExample { this.noValue = true; } + // 构造函数,包含条件表达式和值,以及类型处理器 protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List) { - this.listValue = true; + this.listValue = true; // 如果值为列表,则设置listValue为true } else { - this.singleValue = true; + this.singleValue = true; // 否则设置为单一值 } } + // 构造函数,包含条件表达式和值 protected Criterion(String condition, Object value) { - this(condition, value, null); + this(condition, value, null); // 调用另一个构造函数,并传递null作为类型处理器 } + // 构造函数,包含条件表达式、两个值和类型处理器 protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; - this.betweenValue = true; + this.betweenValue = true; // 设置为区间值 } + // 构造函数,包含条件表达式、两个值 protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); + this(condition, value, secondValue, null); // 调用另一个构造函数,并传递null作为类型处理器 } } + } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectComment.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectComment.java index 846e645..b20d379 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectComment.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectComment.java @@ -1,26 +1,28 @@ -package com.macro.mall.model; +package com.macro.mall.model; // 定义包名 -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import java.util.Date; +import io.swagger.annotations.ApiModelProperty; // 导入Swagger注解库 +import java.io.Serializable; // 导入序列化接口 +import java.util.Date; // 导入日期类 +// 定义CmsSubjectComment类,实现Serializable接口 public class CmsSubjectComment implements Serializable { - private Long id; + private Long id; // 评论ID - private Long subjectId; + private Long subjectId; // 专题ID - private String memberNickName; + private String memberNickName; // 会员昵称 - private String memberIcon; + private String memberIcon; // 会员头像 - private String content; + private String content; // 评论内容 - private Date createTime; + private Date createTime; // 创建时间 - private Integer showStatus; + private Integer showStatus; // 显示状态 - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; // 序列化版本号 + // Getter和Setter方法 public Long getId() { return id; } @@ -77,21 +79,22 @@ public class CmsSubjectComment implements Serializable { this.showStatus = showStatus; } + // 重写toString方法,用于打印对象信息 @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", subjectId=").append(subjectId); - sb.append(", memberNickName=").append(memberNickName); - sb.append(", memberIcon=").append(memberIcon); - sb.append(", content=").append(content); - sb.append(", createTime=").append(createTime); - sb.append(", showStatus=").append(showStatus); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); + StringBuilder sb = new StringBuilder(); // 创建StringBuilder对象 + sb.append(getClass().getSimpleName()); // 添加类名 + sb.append(" ["); // 添加左方括号 + sb.append("Hash = ").append(hashCode()); // 添加哈希码 + sb.append(", id=").append(id); // 添加ID + sb.append(", subjectId=").append(subjectId); // 添加专题ID + sb.append(", memberNickName=").append(memberNickName); // 添加会员昵称 + sb.append(", memberIcon=").append(memberIcon); // 添加会员头像 + sb.append(", content=").append(content); // 添加评论内容 + sb.append(", createTime=").append(createTime); // 添加创建时间 + sb.append(", showStatus=").append(showStatus); // 添加显示状态 + sb.append(", serialVersionUID=").append(serialVersionUID); // 添加序列化版本号 + sb.append("]"); // 添加右方括号 + return sb.toString(); // 返回字符串表示形式 } -} \ No newline at end of file +} diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCommentExample.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCommentExample.java index bee2327..bbe409c 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCommentExample.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectCommentExample.java @@ -5,46 +5,58 @@ import java.util.Date; import java.util.List; public class CmsSubjectCommentExample { + // 用于存储排序子句的字符串 protected String orderByClause; + // 用于指示查询是否为distinct(去重) protected boolean distinct; + // 用于存储多个查询条件的列表 protected List oredCriteria; + // 构造函数,初始化oredCriteria为一个空的ArrayList public CmsSubjectCommentExample() { oredCriteria = new ArrayList<>(); } + // 设置排序子句的方法 public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } + // 获取排序子句的方法 public String getOrderByClause() { return orderByClause; } + // 设置是否去重的方法 public void setDistinct(boolean distinct) { this.distinct = distinct; } + // 判断是否去重的方法 public boolean isDistinct() { return distinct; } + // 获取查询条件列表的方法 public List getOredCriteria() { return oredCriteria; } + // 将一个Criteria对象添加到查询条件列表中的方法 public void or(Criteria criteria) { oredCriteria.add(criteria); } + // 创建一个新的Criteria对象并添加到查询条件列表中的方法 public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } + // 创建一个Criteria对象,如果查询条件列表为空则将其添加到列表中的方法 public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { @@ -53,37 +65,46 @@ public class CmsSubjectCommentExample { return criteria; } + // 内部方法,用于创建一个新的Criteria对象 protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } + // 清除所有查询条件和排序子句,并将distinct设置为false的方法 public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } + protected abstract static class GeneratedCriteria { + // 定义一个受保护的列表,用于存储查询条件 protected List criteria; + // 构造函数,初始化criteria为一个新的ArrayList protected GeneratedCriteria() { super(); criteria = new ArrayList<>(); } + // 判断是否有有效的查询条件 public boolean isValid() { return criteria.size() > 0; } + // 获取所有的查询条件 public List getAllCriteria() { return criteria; } + // 获取当前的查询条件列表 public List getCriteria() { return criteria; } + // 添加一个简单的查询条件 protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); @@ -91,6 +112,7 @@ public class CmsSubjectCommentExample { criteria.add(new Criterion(condition)); } + // 添加一个带值的查询条件 protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); @@ -98,6 +120,7 @@ public class CmsSubjectCommentExample { criteria.add(new Criterion(condition, value)); } + // 添加一个带两个值的查询条件(用于BETWEEN查询) protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); @@ -105,512 +128,604 @@ public class CmsSubjectCommentExample { criteria.add(new Criterion(condition, value1, value2)); } + // 以下是各种具体的查询条件的生成方法,例如id、subjectId和memberNickName等字段的条件 public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } + // 检查id是否不为空 public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } + // 检查id是否等于指定值 public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } + // 检查id是否不等于指定值 public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } + // 检查id是否大于指定值 public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } + // 检查id是否大于或等于指定值 public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } + // 检查id是否小于指定值 public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } + // 检查id是否小于或等于指定值 public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } + // 检查id是否在指定的列表中 public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } + // 检查id是否不在指定的列表中 public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } + // 检查id是否在指定的范围内(包含边界) public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } + // 检查id是否不在指定的范围内(不包含边界) public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } + // 检查subject_id是否为空 public Criteria andSubjectIdIsNull() { addCriterion("subject_id is null"); return (Criteria) this; } + // 检查subject_id是否不为空 public Criteria andSubjectIdIsNotNull() { addCriterion("subject_id is not null"); return (Criteria) this; } + // 检查subject_id是否等于指定值 public Criteria andSubjectIdEqualTo(Long value) { addCriterion("subject_id =", value, "subjectId"); return (Criteria) this; } + // 检查subject_id是否不等于指定值 public Criteria andSubjectIdNotEqualTo(Long value) { addCriterion("subject_id <>", value, "subjectId"); return (Criteria) this; } + // 检查subject_id是否大于指定值 public Criteria andSubjectIdGreaterThan(Long value) { addCriterion("subject_id >", value, "subjectId"); return (Criteria) this; } + // 检查subject_id是否大于或等于指定值 public Criteria andSubjectIdGreaterThanOrEqualTo(Long value) { addCriterion("subject_id >=", value, "subjectId"); return (Criteria) this; } + // 检查subject_id是否小于指定值 public Criteria andSubjectIdLessThan(Long value) { addCriterion("subject_id <", value, "subjectId"); return (Criteria) this; } + // 检查subject_id是否小于或等于指定值 public Criteria andSubjectIdLessThanOrEqualTo(Long value) { addCriterion("subject_id <=", value, "subjectId"); return (Criteria) this; } + // 检查subject_id是否在指定的列表中 public Criteria andSubjectIdIn(List values) { addCriterion("subject_id in", values, "subjectId"); return (Criteria) this; } + // 检查subject_id是否不在指定的列表中 public Criteria andSubjectIdNotIn(List values) { addCriterion("subject_id not in", values, "subjectId"); return (Criteria) this; } + // 检查subject_id是否在指定的范围内(包含边界) public Criteria andSubjectIdBetween(Long value1, Long value2) { addCriterion("subject_id between", value1, value2, "subjectId"); return (Criteria) this; } + // 检查subject_id是否不在指定的范围内(不包含边界) public Criteria andSubjectIdNotBetween(Long value1, Long value2) { addCriterion("subject_id not between", value1, value2, "subjectId"); return (Criteria) this; } + // 检查member_nick_name是否为空 public Criteria andMemberNickNameIsNull() { addCriterion("member_nick_name is null"); return (Criteria) this; } + // 检查member_nick_name是否不为空 public Criteria andMemberNickNameIsNotNull() { addCriterion("member_nick_name is not null"); return (Criteria) this; } + // 检查member_nick_name是否等于指定值 public Criteria andMemberNickNameEqualTo(String value) { addCriterion("member_nick_name =", value, "memberNickName"); return (Criteria) this; } + // 检查member_nick_name是否不等于指定值 public Criteria andMemberNickNameNotEqualTo(String value) { addCriterion("member_nick_name <>", value, "memberNickName"); return (Criteria) this; } + // 检查member_nick_name是否大于指定值 public Criteria andMemberNickNameGreaterThan(String value) { addCriterion("member_nick_name >", value, "memberNickName"); return (Criteria) this; } + // 检查member_nick_name是否大于或等于指定值 public Criteria andMemberNickNameGreaterThanOrEqualTo(String value) { addCriterion("member_nick_name >=", value, "memberNickName"); return (Criteria) this; } + // 检查member_nick_name是否小于指定值 public Criteria andMemberNickNameLessThan(String value) { addCriterion("member_nick_name <", value, "memberNickName"); return (Criteria) this; } + + // 检查 member_nick_name 是否小于或等于给定的值 public Criteria andMemberNickNameLessThanOrEqualTo(String value) { addCriterion("member_nick_name <=", value, "memberNickName"); return (Criteria) this; } + // 检查 member_nick_name 是否包含给定的值(模糊匹配) public Criteria andMemberNickNameLike(String value) { addCriterion("member_nick_name like", value, "memberNickName"); return (Criteria) this; } + // 检查 member_nick_name 是否不包含给定的值(模糊匹配) public Criteria andMemberNickNameNotLike(String value) { addCriterion("member_nick_name not like", value, "memberNickName"); return (Criteria) this; } + // 检查 member_nick_name 是否在给定的值列表中 public Criteria andMemberNickNameIn(List values) { addCriterion("member_nick_name in", values, "memberNickName"); return (Criteria) this; } + // 检查 member_nick_name 是否不在给定的值列表中 public Criteria andMemberNickNameNotIn(List values) { addCriterion("member_nick_name not in", values, "memberNickName"); return (Criteria) this; } + // 检查 member_nick_name 是否在给定的两个值之间 public Criteria andMemberNickNameBetween(String value1, String value2) { addCriterion("member_nick_name between", value1, value2, "memberNickName"); return (Criteria) this; } + // 检查 member_nick_name 是否不在给定的两个值之间 public Criteria andMemberNickNameNotBetween(String value1, String value2) { addCriterion("member_nick_name not between", value1, value2, "memberNickName"); return (Criteria) this; } + // 检查 member_icon 是否为空 public Criteria andMemberIconIsNull() { addCriterion("member_icon is null"); return (Criteria) this; } + // 检查 member_icon 是否不为空 public Criteria andMemberIconIsNotNull() { addCriterion("member_icon is not null"); return (Criteria) this; } + // 检查 member_icon 是否等于给定的值 public Criteria andMemberIconEqualTo(String value) { addCriterion("member_icon =", value, "memberIcon"); return (Criteria) this; } + // 检查 member_icon 是否不等于给定的值 public Criteria andMemberIconNotEqualTo(String value) { addCriterion("member_icon <>", value, "memberIcon"); return (Criteria) this; } + // 检查 member_icon 是否大于给定的值 public Criteria andMemberIconGreaterThan(String value) { addCriterion("member_icon >", value, "memberIcon"); return (Criteria) this; } + // 检查 member_icon 是否大于或等于给定的值 public Criteria andMemberIconGreaterThanOrEqualTo(String value) { addCriterion("member_icon >=", value, "memberIcon"); return (Criteria) this; } + // 检查 member_icon 是否小于给定的值 public Criteria andMemberIconLessThan(String value) { addCriterion("member_icon <", value, "memberIcon"); return (Criteria) this; } + // 检查 member_icon 是否小于或等于给定的值 public Criteria andMemberIconLessThanOrEqualTo(String value) { addCriterion("member_icon <=", value, "memberIcon"); return (Criteria) this; } + // 检查 member_icon 是否包含给定的值(模糊匹配) public Criteria andMemberIconLike(String value) { addCriterion("member_icon like", value, "memberIcon"); return (Criteria) this; } + // 检查 member_icon 是否不包含给定的值(模糊匹配) public Criteria andMemberIconNotLike(String value) { addCriterion("member_icon not like", value, "memberIcon"); return (Criteria) this; } + // 检查 member_icon 是否在给定的值列表中 public Criteria andMemberIconIn(List values) { addCriterion("member_icon in", values, "memberIcon"); return (Criteria) this; } + // 检查 member_icon 是否不在给定的值列表中 public Criteria andMemberIconNotIn(List values) { addCriterion("member_icon not in", values, "memberIcon"); return (Criteria) this; } + // 检查 member_icon 是否在给定的两个值之间 public Criteria andMemberIconBetween(String value1, String value2) { addCriterion("member_icon between", value1, value2, "memberIcon"); return (Criteria) this; } + // 检查 member_icon 是否不在给定的两个值之间 public Criteria andMemberIconNotBetween(String value1, String value2) { addCriterion("member_icon not between", value1, value2, "memberIcon"); return (Criteria) this; } + // 检查 content 是否为空 public Criteria andContentIsNull() { addCriterion("content is null"); return (Criteria) this; } + // 检查 content 是否不为空 public Criteria andContentIsNotNull() { addCriterion("content is not null"); return (Criteria) this; } + // 检查 content 是否等于给定的值 public Criteria andContentEqualTo(String value) { addCriterion("content =", value, "content"); return (Criteria) this; } + // 检查 content 是否不等于给定的值 public Criteria andContentNotEqualTo(String value) { addCriterion("content <>", value, "content"); return (Criteria) this; } + // 检查 content 是否大于给定的值 public Criteria andContentGreaterThan(String value) { addCriterion("content >", value, "content"); return (Criteria) this; } + // 检查 content 是否大于或等于给定的值 public Criteria andContentGreaterThanOrEqualTo(String value) { addCriterion("content >=", value, "content"); return (Criteria) this; } + // 检查 content 是否小于给定的值 public Criteria andContentLessThan(String value) { addCriterion("content <", value, "content"); return (Criteria) this; } + // 检查 content 是否小于或等于给定的值 public Criteria andContentLessThanOrEqualTo(String value) { addCriterion("content <=", value, "content"); return (Criteria) this; } + // 检查 content 是否包含给定的值(模糊匹配) public Criteria andContentLike(String value) { addCriterion("content like", value, "content"); return (Criteria) this; } + // 检查 content 是否不包含给定的值(模糊匹配) public Criteria andContentNotLike(String value) { addCriterion("content not like", value, "content"); return (Criteria) this; } + // 检查 content 是否在给定的值列表中 public Criteria andContentIn(List values) { addCriterion("content in", values, "content"); return (Criteria) this; } + // 检查 content 是否不在给定的值列表中 public Criteria andContentNotIn(List values) { addCriterion("content not in", values, "content"); return (Criteria) this; } + // 检查 content 是否在给定的两个值之间 public Criteria andContentBetween(String value1, String value2) { addCriterion("content between", value1, value2, "content"); return (Criteria) this; } + // 检查 content 是否不在给定的两个值之间 public Criteria andContentNotBetween(String value1, String value2) { addCriterion("content not between", value1, value2, "content"); return (Criteria) this; } - public Criteria andCreateTimeIsNull() { - addCriterion("create_time is null"); - return (Criteria) this; - } + // 检查 create_time 是否不为空 public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } + // 检查 create_time 是否等于给定的值 public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否不等于给定的值 public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否大于给定的值 public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否大于或等于给定的值 public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否小于给定的值 public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否小于或等于给定的值 public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否在给定的值列表中 public Criteria andCreateTimeIn(List values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } + // 检查 create_time 是否不在给定的值列表中 public Criteria andCreateTimeNotIn(List values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } + // 检查 create_time 是否在给定的两个值之间 public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } + // 检查 create_time 是否不在给定的两个值之间 public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } + // 检查 show_status 是否为空 public Criteria andShowStatusIsNull() { addCriterion("show_status is null"); return (Criteria) this; } + // 检查 show_status 是否不为空 public Criteria andShowStatusIsNotNull() { addCriterion("show_status is not null"); return (Criteria) this; } + // 检查 show_status 是否等于给定的值 public Criteria andShowStatusEqualTo(Integer value) { addCriterion("show_status =", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 是否不等于给定的值 public Criteria andShowStatusNotEqualTo(Integer value) { addCriterion("show_status <>", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 是否大于给定的值 public Criteria andShowStatusGreaterThan(Integer value) { addCriterion("show_status >", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 是否大于或等于给定的值 public Criteria andShowStatusGreaterThanOrEqualTo(Integer value) { addCriterion("show_status >=", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 是否小于给定的值 public Criteria andShowStatusLessThan(Integer value) { addCriterion("show_status <", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 是否小于或等于给定的值 public Criteria andShowStatusLessThanOrEqualTo(Integer value) { addCriterion("show_status <=", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 是否在给定的值列表中 public Criteria andShowStatusIn(List values) { addCriterion("show_status in", values, "showStatus"); return (Criteria) this; } + // 检查 show_status 是否不在给定的值列表中 public Criteria andShowStatusNotIn(List values) { addCriterion("show_status not in", values, "showStatus"); return (Criteria) this; } + // 检查 show_status 是否在给定的两个值之间 public Criteria andShowStatusBetween(Integer value1, Integer value2) { addCriterion("show_status between", value1, value2, "showStatus"); return (Criteria) this; } + // 检查 show_status 是否不在给定的两个值之间 public Criteria andShowStatusNotBetween(Integer value1, Integer value2) { addCriterion("show_status not between", value1, value2, "showStatus"); return (Criteria) this; } + } + // 定义一个静态内部类 Criteria,继承自 GeneratedCriteria public static class Criteria extends GeneratedCriteria { + // 构造函数,调用父类的构造函数 protected Criteria() { super(); } } + // 定义一个静态内部类 Criterion,用于封装查询条件 public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - + private String condition; // 存储查询条件的字符串 + private Object value; // 存储查询条件的值 + private Object secondValue; // 存储查询条件的第二个值(用于 between 查询) + private boolean noValue; // 标记是否没有值 + private boolean singleValue; // 标记是否是单一值 + private boolean betweenValue; // 标记是否是区间值 + private boolean listValue; // 标记是否是列表值 + private String typeHandler; // 类型处理器,用于处理特定类型的数据转换 + + // 获取查询条件 public String getCondition() { return condition; } + // 获取查询条件的值 public Object getValue() { return value; } + // 获取查询条件的第二个值 public Object getSecondValue() { return secondValue; } + // 判断是否没有值 public boolean isNoValue() { return noValue; } + // 判断是否是单一值 public boolean isSingleValue() { return singleValue; } + // 判断是否是区间值 public boolean isBetweenValue() { return betweenValue; } + // 判断是否是列表值 public boolean isListValue() { return listValue; } + // 获取类型处理器 public String getTypeHandler() { return typeHandler; } + // 构造函数,只包含条件,默认没有值,使用 null 作为类型处理器 protected Criterion(String condition) { super(); this.condition = condition; @@ -618,6 +733,7 @@ public class CmsSubjectCommentExample { this.noValue = true; } + // 构造函数,包含条件和值,根据值的类型设置 singleValue 或 listValue protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -630,10 +746,12 @@ public class CmsSubjectCommentExample { } } + // 构造函数,包含条件和值,不指定类型处理器 protected Criterion(String condition, Object value) { this(condition, value, null); } + // 构造函数,包含条件、第一个值和第二个值,以及类型处理器,设置 betweenValue 为 true protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -643,8 +761,10 @@ public class CmsSubjectCommentExample { this.betweenValue = true; } + // 构造函数,包含条件、第一个值和第二个值,不指定类型处理器 protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } + } \ No newline at end of file diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectExample.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectExample.java index 62e2333..065d00c 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectExample.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsSubjectExample.java @@ -5,46 +5,58 @@ import java.util.Date; import java.util.List; public class CmsSubjectExample { + // 定义一个字符串变量,用于存储排序子句 protected String orderByClause; + // 定义一个布尔变量,用于指示查询是否为distinct(去重) protected boolean distinct; + // 定义一个列表,用于存储多个查询条件(Criteria对象) protected List oredCriteria; + // 构造函数,初始化oredCriteria为一个新的ArrayList public CmsSubjectExample() { oredCriteria = new ArrayList<>(); } + // 设置排序子句的方法 public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } + // 获取排序子句的方法 public String getOrderByClause() { return orderByClause; } + // 设置distinct标志的方法 public void setDistinct(boolean distinct) { this.distinct = distinct; } + // 获取distinct标志的方法 public boolean isDistinct() { return distinct; } + // 获取查询条件列表的方法 public List getOredCriteria() { return oredCriteria; } + // 添加一个查询条件到列表中的方法 public void or(Criteria criteria) { oredCriteria.add(criteria); } + // 创建一个新的查询条件并添加到列表中的方法 public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } + // 创建一个新的查询条件,如果当前没有查询条件则添加到列表中的方法 public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { @@ -53,37 +65,46 @@ public class CmsSubjectExample { return criteria; } + // 内部方法,用于创建一个新的Criteria对象 protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } + // 清除所有查询条件和排序子句,并将distinct标志重置为false的方法 public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } + protected abstract static class GeneratedCriteria { + // 定义一个列表来存储所有的查询条件 protected List criteria; + // 构造函数,初始化criteria列表 protected GeneratedCriteria() { super(); criteria = new ArrayList<>(); } + // 判断是否有有效的查询条件 public boolean isValid() { return criteria.size() > 0; } + // 获取所有查询条件 public List getAllCriteria() { return criteria; } + // 获取查询条件列表 public List getCriteria() { return criteria; } + // 添加一个简单的查询条件(例如 "id is null") protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); @@ -91,6 +112,7 @@ public class CmsSubjectExample { criteria.add(new Criterion(condition)); } + // 添加一个带值的查询条件(例如 "id = 1") protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); @@ -98,6 +120,7 @@ public class CmsSubjectExample { criteria.add(new Criterion(condition, value)); } + // 添加一个范围查询条件(例如 "id between 1 and 10") protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); @@ -105,6 +128,7 @@ public class CmsSubjectExample { criteria.add(new Criterion(condition, value1, value2)); } + // 以下方法用于生成具体的查询条件,例如 id 和 category_id 的各种比较操作 public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; @@ -250,867 +274,1035 @@ public class CmsSubjectExample { return (Criteria) this; } + + // 添加一个条件,要求title字段的值大于或等于指定的值 public Criteria andTitleGreaterThanOrEqualTo(String value) { addCriterion("title >=", value, "title"); return (Criteria) this; } + // 添加一个条件,要求title字段的值小于指定的值 public Criteria andTitleLessThan(String value) { addCriterion("title <", value, "title"); return (Criteria) this; } + // 添加一个条件,要求title字段的值小于或等于指定的值 public Criteria andTitleLessThanOrEqualTo(String value) { addCriterion("title <=", value, "title"); return (Criteria) this; } + // 添加一个条件,要求title字段的值匹配指定的模式(使用SQL中的LIKE操作符) public Criteria andTitleLike(String value) { addCriterion("title like", value, "title"); return (Criteria) this; } + // 添加一个条件,要求title字段的值不匹配指定的模式(使用SQL中的NOT LIKE操作符) public Criteria andTitleNotLike(String value) { addCriterion("title not like", value, "title"); return (Criteria) this; } + // 添加一个条件,要求title字段的值在指定的列表中 public Criteria andTitleIn(List values) { addCriterion("title in", values, "title"); return (Criteria) this; } + // 添加一个条件,要求title字段的值不在指定的列表中 public Criteria andTitleNotIn(List values) { addCriterion("title not in", values, "title"); return (Criteria) this; } + // 添加一个条件,要求title字段的值在指定的范围内(包括边界值) public Criteria andTitleBetween(String value1, String value2) { addCriterion("title between", value1, value2, "title"); return (Criteria) this; } + // 添加一个条件,要求title字段的值不在指定的范围内(不包括边界值) public Criteria andTitleNotBetween(String value1, String value2) { addCriterion("title not between", value1, value2, "title"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值为空 public Criteria andPicIsNull() { addCriterion("pic is null"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值不为空 public Criteria andPicIsNotNull() { addCriterion("pic is not null"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值等于指定的值 public Criteria andPicEqualTo(String value) { addCriterion("pic =", value, "pic"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值不等于指定的值 public Criteria andPicNotEqualTo(String value) { addCriterion("pic <>", value, "pic"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值大于指定的值 public Criteria andPicGreaterThan(String value) { addCriterion("pic >", value, "pic"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值大于或等于指定的值 public Criteria andPicGreaterThanOrEqualTo(String value) { addCriterion("pic >=", value, "pic"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值小于指定的值 public Criteria andPicLessThan(String value) { addCriterion("pic <", value, "pic"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值小于或等于指定的值 public Criteria andPicLessThanOrEqualTo(String value) { addCriterion("pic <=", value, "pic"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值匹配指定的模式(使用SQL中的LIKE操作符) public Criteria andPicLike(String value) { addCriterion("pic like", value, "pic"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值不匹配指定的模式(使用SQL中的NOT LIKE操作符) public Criteria andPicNotLike(String value) { addCriterion("pic not like", value, "pic"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值在指定的列表中 public Criteria andPicIn(List values) { addCriterion("pic in", values, "pic"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值不在指定的列表中 public Criteria andPicNotIn(List values) { addCriterion("pic not in", values, "pic"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值在指定的范围内(包括边界值) public Criteria andPicBetween(String value1, String value2) { addCriterion("pic between", value1, value2, "pic"); return (Criteria) this; } + // 添加一个条件,要求pic字段的值不在指定的范围内(不包括边界值) public Criteria andPicNotBetween(String value1, String value2) { addCriterion("pic not between", value1, value2, "pic"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值为空 public Criteria andProductCountIsNull() { addCriterion("product_count is null"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值不为空 public Criteria andProductCountIsNotNull() { addCriterion("product_count is not null"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值等于指定的值 public Criteria andProductCountEqualTo(Integer value) { - addCriterion("product_count =", value, "productCount"); + addCriterion("product_count =", value, "product_count"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值不等于指定的值 public Criteria andProductCountNotEqualTo(Integer value) { - addCriterion("product_count <>", value, "productCount"); + addCriterion("product_count <>", value, "product_count"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值大于指定的值 public Criteria andProductCountGreaterThan(Integer value) { - addCriterion("product_count >", value, "productCount"); + addCriterion("product_count >", value, "product_count"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值大于或等于指定的值 public Criteria andProductCountGreaterThanOrEqualTo(Integer value) { - addCriterion("product_count >=", value, "productCount"); + addCriterion("product_count >=", value, "product_count"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值小于指定的值 public Criteria andProductCountLessThan(Integer value) { - addCriterion("product_count <", value, "productCount"); + addCriterion("product_count <", value, "product_count"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值小于或等于指定的值 public Criteria andProductCountLessThanOrEqualTo(Integer value) { - addCriterion("product_count <=", value, "productCount"); + addCriterion("product_count <=", value, "product_count"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值在指定的列表中 public Criteria andProductCountIn(List values) { - addCriterion("product_count in", values, "productCount"); + addCriterion("product_count in", values, "product_count"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值不在指定的列表中 public Criteria andProductCountNotIn(List values) { - addCriterion("product_count not in", values, "productCount"); + addCriterion("product_count not in", values, "product_count"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值在指定的范围内(包括边界值) public Criteria andProductCountBetween(Integer value1, Integer value2) { - addCriterion("product_count between", value1, value2, "productCount"); + addCriterion("product_count between", value1, value2, "product_count"); return (Criteria) this; } + // 添加一个条件,要求product_count字段的值不在指定的范围内(不包括边界值) public Criteria andProductCountNotBetween(Integer value1, Integer value2) { - addCriterion("product_count not between", value1, value2, "productCount"); + addCriterion("product_count not between", value1, value2, "product_count"); return (Criteria) this; } + // 检查 recommend_status 是否为空 public Criteria andRecommendStatusIsNull() { addCriterion("recommend_status is null"); return (Criteria) this; } + // 检查 recommend_status 是否不为空 public Criteria andRecommendStatusIsNotNull() { addCriterion("recommend_status is not null"); return (Criteria) this; } + // 检查 recommend_status 是否等于指定值 public Criteria andRecommendStatusEqualTo(Integer value) { addCriterion("recommend_status =", value, "recommendStatus"); return (Criteria) this; } + // 检查 recommend_status 是否不等于指定值 public Criteria andRecommendStatusNotEqualTo(Integer value) { addCriterion("recommend_status <>", value, "recommendStatus"); return (Criteria) this; } + // 检查 recommend_status 是否大于指定值 public Criteria andRecommendStatusGreaterThan(Integer value) { addCriterion("recommend_status >", value, "recommendStatus"); return (Criteria) this; } + // 检查 recommend_status 是否大于或等于指定值 public Criteria andRecommendStatusGreaterThanOrEqualTo(Integer value) { addCriterion("recommend_status >=", value, "recommendStatus"); return (Criteria) this; } + // 检查 recommend_status 是否小于指定值 public Criteria andRecommendStatusLessThan(Integer value) { addCriterion("recommend_status <", value, "recommendStatus"); return (Criteria) this; } + // 检查 recommend_status 是否小于或等于指定值 public Criteria andRecommendStatusLessThanOrEqualTo(Integer value) { addCriterion("recommend_status <=", value, "recommendStatus"); return (Criteria) this; } + // 检查 recommend_status 是否在指定的列表中 public Criteria andRecommendStatusIn(List values) { addCriterion("recommend_status in", values, "recommendStatus"); return (Criteria) this; } + // 检查 recommend_status 是否不在指定的列表中 public Criteria andRecommendStatusNotIn(List values) { addCriterion("recommend_status not in", values, "recommendStatus"); return (Criteria) this; } + // 检查 recommend_status 是否在指定的范围内 public Criteria andRecommendStatusBetween(Integer value1, Integer value2) { addCriterion("recommend_status between", value1, value2, "recommendStatus"); return (Criteria) this; } + // 检查 recommend_status 是否不在指定的范围内 public Criteria andRecommendStatusNotBetween(Integer value1, Integer value2) { addCriterion("recommend_status not between", value1, value2, "recommendStatus"); return (Criteria) this; } + // 检查 create_time 是否为空 public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; } + // 检查 create_time 是否不为空 public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } + // 检查 create_time 是否等于指定值 public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否不等于指定值 public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否大于指定值 public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否大于或等于指定值 public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否小于指定值 public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否小于或等于指定值 public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } + // 检查 create_time 是否在指定的列表中 public Criteria andCreateTimeIn(List values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } + // 检查 create_time 是否不在指定的列表中 public Criteria andCreateTimeNotIn(List values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } + // 检查 create_time 是否在指定的范围内 public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } + // 检查 create_time 是否不在指定的范围内 public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } + // 检查 collect_count 是否为空 public Criteria andCollectCountIsNull() { addCriterion("collect_count is null"); return (Criteria) this; } + // 检查 collect_count 是否不为空 public Criteria andCollectCountIsNotNull() { addCriterion("collect_count is not null"); return (Criteria) this; } + // 检查 collect_count 是否等于指定值 public Criteria andCollectCountEqualTo(Integer value) { addCriterion("collect_count =", value, "collectCount"); return (Criteria) this; } + // 检查 collect_count 是否不等于指定值 public Criteria andCollectCountNotEqualTo(Integer value) { addCriterion("collect_count <>", value, "collectCount"); return (Criteria) this; } + // 检查 collect_count 是否大于指定值 public Criteria andCollectCountGreaterThan(Integer value) { addCriterion("collect_count >", value, "collectCount"); return (Criteria) this; } + // 检查 collect_count 是否大于或等于指定值 public Criteria andCollectCountGreaterThanOrEqualTo(Integer value) { addCriterion("collect_count >=", value, "collectCount"); return (Criteria) this; } + // 检查 collect_count 是否小于指定值 public Criteria andCollectCountLessThan(Integer value) { addCriterion("collect_count <", value, "collectCount"); return (Criteria) this; } + // 检查 collect_count 是否小于或等于指定值 public Criteria andCollectCountLessThanOrEqualTo(Integer value) { addCriterion("collect_count <=", value, "collectCount"); return (Criteria) this; } + // 检查 collect_count 是否在指定的值列表中 public Criteria andCollectCountIn(List values) { addCriterion("collect_count in", values, "collectCount"); return (Criteria) this; } + // 检查 collect_count 是否不在指定的值列表中 public Criteria andCollectCountNotIn(List values) { addCriterion("collect_count not in", values, "collectCount"); return (Criteria) this; } + // 检查 collect_count 是否在指定的范围内 public Criteria andCollectCountBetween(Integer value1, Integer value2) { addCriterion("collect_count between", value1, value2, "collectCount"); return (Criteria) this; } + // 检查 collect_count 是否不在指定的范围内 public Criteria andCollectCountNotBetween(Integer value1, Integer value2) { addCriterion("collect_count not between", value1, value2, "collectCount"); return (Criteria) this; } + // 检查 read_count 是否为空 public Criteria andReadCountIsNull() { addCriterion("read_count is null"); return (Criteria) this; } + // 检查 read_count 是否不为空 public Criteria andReadCountIsNotNull() { addCriterion("read_count is not null"); return (Criteria) this; } + // 检查 read_count 是否等于指定值 public Criteria andReadCountEqualTo(Integer value) { addCriterion("read_count =", value, "readCount"); return (Criteria) this; } + // 检查 read_count 是否不等于指定值 public Criteria andReadCountNotEqualTo(Integer value) { addCriterion("read_count <>", value, "readCount"); return (Criteria) this; } + // 检查 read_count 是否大于指定值 public Criteria andReadCountGreaterThan(Integer value) { addCriterion("read_count >", value, "readCount"); return (Criteria) this; } + // 检查 read_count 是否大于或等于指定值 public Criteria andReadCountGreaterThanOrEqualTo(Integer value) { addCriterion("read_count >=", value, "readCount"); return (Criteria) this; } + // 检查 read_count 是否小于指定值 public Criteria andReadCountLessThan(Integer value) { addCriterion("read_count <", value, "readCount"); return (Criteria) this; } + // 检查 read_count 是否小于或等于指定值 public Criteria andReadCountLessThanOrEqualTo(Integer value) { addCriterion("read_count <=", value, "readCount"); return (Criteria) this; } + // 检查 read_count 是否在指定的值列表中 public Criteria andReadCountIn(List values) { addCriterion("read_count in", values, "readCount"); return (Criteria) this; } + // 检查 read_count 是否不在指定的值列表中 public Criteria andReadCountNotIn(List values) { addCriterion("read_count not in", values, "readCount"); return (Criteria) this; } + // 检查 read_count 是否在指定的范围内 public Criteria andReadCountBetween(Integer value1, Integer value2) { addCriterion("read_count between", value1, value2, "readCount"); return (Criteria) this; } + // 检查 read_count 是否不在指定的范围内 public Criteria andReadCountNotBetween(Integer value1, Integer value2) { addCriterion("read_count not between", value1, value2, "readCount"); return (Criteria) this; } + // 检查 comment_count 是否为空 public Criteria andCommentCountIsNull() { addCriterion("comment_count is null"); return (Criteria) this; } + // 检查 comment_count 是否不为空 public Criteria andCommentCountIsNotNull() { addCriterion("comment_count is not null"); return (Criteria) this; } + // 检查 comment_count 是否等于指定值 public Criteria andCommentCountEqualTo(Integer value) { addCriterion("comment_count =", value, "commentCount"); return (Criteria) this; } + // 检查 comment_count 是否不等于指定值 public Criteria andCommentCountNotEqualTo(Integer value) { addCriterion("comment_count <>", value, "commentCount"); return (Criteria) this; } + // 检查 comment_count 是否大于指定值 public Criteria andCommentCountGreaterThan(Integer value) { addCriterion("comment_count >", value, "commentCount"); return (Criteria) this; } + // 检查 comment_count 是否大于或等于指定值 public Criteria andCommentCountGreaterThanOrEqualTo(Integer value) { addCriterion("comment_count >=", value, "commentCount"); return (Criteria) this; } + // 检查 comment_count 是否小于指定值 public Criteria andCommentCountLessThan(Integer value) { addCriterion("comment_count <", value, "commentCount"); return (Criteria) this; } + // 检查 comment_count 是否小于或等于指定值 public Criteria andCommentCountLessThanOrEqualTo(Integer value) { addCriterion("comment_count <=", value, "commentCount"); return (Criteria) this; } + // 检查 comment_count 是否在指定的值列表中 public Criteria andCommentCountIn(List values) { addCriterion("comment_count in", values, "commentCount"); return (Criteria) this; } + // 检查 comment_count 是否不在指定的值列表中 public Criteria andCommentCountNotIn(List values) { addCriterion("comment_count not in", values, "commentCount"); return (Criteria) this; } + // 检查 comment_count 是否在指定的范围内 public Criteria andCommentCountBetween(Integer value1, Integer value2) { addCriterion("comment_count between", value1, value2, "commentCount"); return (Criteria) this; } + // 检查 comment_count 是否不在指定的范围内 public Criteria andCommentCountNotBetween(Integer value1, Integer value2) { addCriterion("comment_count not between", value1, value2, "commentCount"); return (Criteria) this; } + + // 检查 album_pics 字段是否为空 public Criteria andAlbumPicsIsNull() { addCriterion("album_pics is null"); return (Criteria) this; } + // 检查 album_pics 字段是否不为空 public Criteria andAlbumPicsIsNotNull() { addCriterion("album_pics is not null"); return (Criteria) this; } + // 检查 album_pics 字段是否等于指定值 public Criteria andAlbumPicsEqualTo(String value) { addCriterion("album_pics =", value, "albumPics"); return (Criteria) this; } + // 检查 album_pics 字段是否不等于指定值 public Criteria andAlbumPicsNotEqualTo(String value) { addCriterion("album_pics <>", value, "albumPics"); return (Criteria) this; } + // 检查 album_pics 字段是否大于指定值 public Criteria andAlbumPicsGreaterThan(String value) { addCriterion("album_pics >", value, "albumPics"); return (Criteria) this; } + // 检查 album_pics 字段是否大于或等于指定值 public Criteria andAlbumPicsGreaterThanOrEqualTo(String value) { addCriterion("album_pics >=", value, "albumPics"); return (Criteria) this; } + // 检查 album_pics 字段是否小于指定值 public Criteria andAlbumPicsLessThan(String value) { addCriterion("album_pics <", value, "albumPics"); return (Criteria) this; } + // 检查 album_pics 字段是否小于或等于指定值 public Criteria andAlbumPicsLessThanOrEqualTo(String value) { addCriterion("album_pics <=", value, "albumPics"); return (Criteria) this; } + // 检查 album_pics 字段是否匹配指定模式(使用 LIKE) public Criteria andAlbumPicsLike(String value) { addCriterion("album_pics like", value, "albumPics"); return (Criteria) this; } + // 检查 album_pics 字段是否不匹配指定模式(使用 NOT LIKE) public Criteria andAlbumPicsNotLike(String value) { addCriterion("album_pics not like", value, "albumPics"); return (Criteria) this; } + // 检查 album_pics 字段是否在指定列表中 public Criteria andAlbumPicsIn(List values) { addCriterion("album_pics in", values, "albumPics"); return (Criteria) this; } + // 检查 album_pics 字段是否不在指定列表中 public Criteria andAlbumPicsNotIn(List values) { addCriterion("album_pics not in", values, "albumPics"); return (Criteria) this; } + // 检查 album_pics 字段是否在指定范围内(between) public Criteria andAlbumPicsBetween(String value1, String value2) { addCriterion("album_pics between", value1, value2, "albumPics"); return (Criteria) this; } + // 检查 album_pics 字段是否不在指定范围内(not between) public Criteria andAlbumPicsNotBetween(String value1, String value2) { addCriterion("album_pics not between", value1, value2, "albumPics"); return (Criteria) this; } + // 检查 description 字段是否为空 public Criteria andDescriptionIsNull() { addCriterion("description is null"); return (Criteria) this; } + // 检查 description 字段是否不为空 public Criteria andDescriptionIsNotNull() { addCriterion("description is not null"); return (Criteria) this; } + // 检查 description 字段是否等于指定值 public Criteria andDescriptionEqualTo(String value) { addCriterion("description =", value, "description"); return (Criteria) this; } + // 检查 description 字段是否不等于指定值 public Criteria andDescriptionNotEqualTo(String value) { addCriterion("description <>", value, "description"); return (Criteria) this; } + // 检查 description 字段是否大于指定值 public Criteria andDescriptionGreaterThan(String value) { addCriterion("description >", value, "description"); return (Criteria) this; } + // 检查 description 字段是否大于或等于指定值 public Criteria andDescriptionGreaterThanOrEqualTo(String value) { addCriterion("description >=", value, "description"); return (Criteria) this; } + // 检查 description 字段是否小于指定值 public Criteria andDescriptionLessThan(String value) { addCriterion("description <", value, "description"); return (Criteria) this; } + // 检查 description 字段是否小于或等于指定值 public Criteria andDescriptionLessThanOrEqualTo(String value) { addCriterion("description <=", value, "description"); return (Criteria) this; } + // 检查 description 字段是否匹配指定模式(使用 LIKE) public Criteria andDescriptionLike(String value) { addCriterion("description like", value, "description"); return (Criteria) this; } + // 检查 description 字段是否不匹配指定模式(使用 NOT LIKE) public Criteria andDescriptionNotLike(String value) { addCriterion("description not like", value, "description"); return (Criteria) this; } + // 检查 description 字段是否在指定列表中 public Criteria andDescriptionIn(List values) { addCriterion("description in", values, "description"); return (Criteria) this; } + // 检查 description 字段是否不在指定列表中 public Criteria andDescriptionNotIn(List values) { addCriterion("description not in", values, "description"); return (Criteria) this; } + // 检查 description 字段是否在指定范围内(between) public Criteria andDescriptionBetween(String value1, String value2) { addCriterion("description between", value1, value2, "description"); return (Criteria) this; } + // 检查 description 字段是否不在指定范围内(not between) public Criteria andDescriptionNotBetween(String value1, String value2) { addCriterion("description not between", value1, value2, "description"); return (Criteria) this; } + // 检查 show_status 字段是否为空 public Criteria andShowStatusIsNull() { addCriterion("show_status is null"); return (Criteria) this; } + // 检查 show_status 字段是否不为空 public Criteria andShowStatusIsNotNull() { addCriterion("show_status is not null"); return (Criteria) this; } + // 检查 show_status 字段是否等于指定值 public Criteria andShowStatusEqualTo(Integer value) { addCriterion("show_status =", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 字段是否不等于指定值 public Criteria andShowStatusNotEqualTo(Integer value) { addCriterion("show_status <>", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 字段是否大于指定值 public Criteria andShowStatusGreaterThan(Integer value) { addCriterion("show_status >", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 字段是否大于或等于指定值 public Criteria andShowStatusGreaterThanOrEqualTo(Integer value) { addCriterion("show_status >=", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 字段是否小于指定值 public Criteria andShowStatusLessThan(Integer value) { addCriterion("show_status <", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 字段是否小于或等于指定值 public Criteria andShowStatusLessThanOrEqualTo(Integer value) { addCriterion("show_status <=", value, "showStatus"); return (Criteria) this; } + // 检查 show_status 字段是否在指定列表中 public Criteria andShowStatusIn(List values) { addCriterion("show_status in", values, "showStatus"); return (Criteria) this; } + // 检查 show_status 字段是否不在指定列表中 public Criteria andShowStatusNotIn(List values) { addCriterion("show_status not in", values, "showStatus"); return (Criteria) this; } + + // 检查 show_status 是否在指定的范围内 public Criteria andShowStatusBetween(Integer value1, Integer value2) { addCriterion("show_status between", value1, value2, "showStatus"); return (Criteria) this; } + // 检查 show_status 是否不在指定的范围内 public Criteria andShowStatusNotBetween(Integer value1, Integer value2) { addCriterion("show_status not between", value1, value2, "showStatus"); return (Criteria) this; } + // 检查 forward_count 是否为空 public Criteria andForwardCountIsNull() { addCriterion("forward_count is null"); return (Criteria) this; } + // 检查 forward_count 是否不为空 public Criteria andForwardCountIsNotNull() { addCriterion("forward_count is not null"); return (Criteria) this; } + // 检查 forward_count 是否等于指定值 public Criteria andForwardCountEqualTo(Integer value) { addCriterion("forward_count =", value, "forwardCount"); return (Criteria) this; } + // 检查 forward_count 是否不等于指定值 public Criteria andForwardCountNotEqualTo(Integer value) { addCriterion("forward_count <>", value, "forwardCount"); return (Criteria) this; } + // 检查 forward_count 是否大于指定值 public Criteria andForwardCountGreaterThan(Integer value) { addCriterion("forward_count >", value, "forwardCount"); return (Criteria) this; } + // 检查 forward_count 是否大于或等于指定值 public Criteria andForwardCountGreaterThanOrEqualTo(Integer value) { addCriterion("forward_count >=", value, "forwardCount"); return (Criteria) this; } + // 检查 forward_count 是否小于指定值 public Criteria andForwardCountLessThan(Integer value) { addCriterion("forward_count <", value, "forwardCount"); return (Criteria) this; } + // 检查 forward_count 是否小于或等于指定值 public Criteria andForwardCountLessThanOrEqualTo(Integer value) { addCriterion("forward_count <=", value, "forwardCount"); return (Criteria) this; } + // 检查 forward_count 是否在指定的列表中 public Criteria andForwardCountIn(List values) { addCriterion("forward_count in", values, "forwardCount"); return (Criteria) this; } + // 检查 forward_count 是否不在指定的列表中 public Criteria andForwardCountNotIn(List values) { addCriterion("forward_count not in", values, "forwardCount"); return (Criteria) this; } + // 检查 forward_count 是否在指定的范围内 public Criteria andForwardCountBetween(Integer value1, Integer value2) { addCriterion("forward_count between", value1, value2, "forwardCount"); return (Criteria) this; } + // 检查 forward_count 是否不在指定的范围内 public Criteria andForwardCountNotBetween(Integer value1, Integer value2) { addCriterion("forward_count not between", value1, value2, "forwardCount"); return (Criteria) this; } + // 检查 category_name 是否为空 public Criteria andCategoryNameIsNull() { addCriterion("category_name is null"); return (Criteria) this; } + // 检查 category_name 是否不为空 public Criteria andCategoryNameIsNotNull() { addCriterion("category_name is not null"); return (Criteria) this; } + // 检查 category_name 是否等于指定值 public Criteria andCategoryNameEqualTo(String value) { addCriterion("category_name =", value, "categoryName"); return (Criteria) this; } + // 检查 category_name 是否不等于指定值 public Criteria andCategoryNameNotEqualTo(String value) { addCriterion("category_name <>", value, "categoryName"); return (Criteria) this; } + // 检查 category_name 是否大于指定值 public Criteria andCategoryNameGreaterThan(String value) { addCriterion("category_name >", value, "categoryName"); return (Criteria) this; } + // 检查 category_name 是否大于或等于指定值 public Criteria andCategoryNameGreaterThanOrEqualTo(String value) { addCriterion("category_name >=", value, "categoryName"); return (Criteria) this; } + // 检查 category_name 是否小于指定值 public Criteria andCategoryNameLessThan(String value) { addCriterion("category_name <", value, "categoryName"); return (Criteria) this; } + // 检查 category_name 是否小于或等于指定值 public Criteria andCategoryNameLessThanOrEqualTo(String value) { addCriterion("category_name <=", value, "categoryName"); return (Criteria) this; } + // 检查 category_name 是否匹配指定模式(使用 LIKE) public Criteria andCategoryNameLike(String value) { addCriterion("category_name like", value, "categoryName"); return (Criteria) this; } + // 检查 category_name 是否不匹配指定模式(使用 NOT LIKE) public Criteria andCategoryNameNotLike(String value) { addCriterion("category_name not like", value, "categoryName"); return (Criteria) this; } + // 检查 category_name 是否在指定的列表中 public Criteria andCategoryNameIn(List values) { addCriterion("category_name in", values, "categoryName"); return (Criteria) this; } + // 检查 category_name 是否不在指定的列表中 public Criteria andCategoryNameNotIn(List values) { addCriterion("category_name not in", values, "categoryName"); return (Criteria) this; } + // 检查 category_name 是否在指定的范围内 public Criteria andCategoryNameBetween(String value1, String value2) { addCriterion("category_name between", value1, value2, "categoryName"); return (Criteria) this; } + // 检查 category_name 是否不在指定的范围内 public Criteria andCategoryNameNotBetween(String value1, String value2) { addCriterion("category_name not between", value1, value2, "categoryName"); return (Criteria) this; } + } public static class Criteria extends GeneratedCriteria { + // 构造函数,初始化Criteria对象 protected Criteria() { super(); } } public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - + private String condition; // 条件表达式 + private Object value; // 条件值 + private Object secondValue; // 第二个条件值(用于between查询) + private boolean noValue; // 是否没有值 + private boolean singleValue; // 是否为单一值 + private boolean betweenValue; // 是否为区间值 + private boolean listValue; // 是否为列表值 + private String typeHandler; // 类型处理器 + + // 获取条件表达式 public String getCondition() { return condition; } + // 获取条件值 public Object getValue() { return value; } + // 获取第二个条件值 public Object getSecondValue() { return secondValue; } + // 判断是否没有值 public boolean isNoValue() { return noValue; } + // 判断是否为单一值 public boolean isSingleValue() { return singleValue; } + // 判断是否为区间值 public boolean isBetweenValue() { return betweenValue; } + // 判断是否为列表值 public boolean isListValue() { return listValue; } + // 获取类型处理器 public String getTypeHandler() { return typeHandler; } + // 构造函数,仅包含条件表达式 protected Criterion(String condition) { super(); this.condition = condition; @@ -1118,33 +1310,38 @@ public class CmsSubjectExample { this.noValue = true; } + // 构造函数,包含条件表达式、值和类型处理器 protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List) { - this.listValue = true; + this.listValue = true; // 如果值是列表,则设置listValue为true } else { - this.singleValue = true; + this.singleValue = true; // 否则设置为单一值 } } + // 构造函数,包含条件表达式和值 protected Criterion(String condition, Object value) { - this(condition, value, null); + this(condition, value, null); // 调用另一个构造函数,并传递null作为类型处理器 } + // 构造函数,包含条件表达式、两个值和类型处理器 protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; - this.betweenValue = true; + this.betweenValue = true; // 设置为区间值 } + // 构造函数,包含条件表达式、两个值 protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); + this(condition, value, secondValue, null); // 调用另一个构造函数,并传递null作为类型处理器 } } + } \ No newline at end of file