|
|
|
|
@ -5,46 +5,58 @@ import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
public class CmsHelpExample {
|
|
|
|
|
// 定义一个字符串变量用于存储排序子句
|
|
|
|
|
protected String orderByClause;
|
|
|
|
|
|
|
|
|
|
// 定义一个布尔变量用于指示是否使用 DISTINCT 关键字
|
|
|
|
|
protected boolean distinct;
|
|
|
|
|
|
|
|
|
|
// 定义一个列表用于存储查询条件(Criteria)
|
|
|
|
|
protected List<Criteria> oredCriteria;
|
|
|
|
|
|
|
|
|
|
// 构造函数,初始化 oredCriteria 列表
|
|
|
|
|
public CmsHelpExample() {
|
|
|
|
|
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<Criteria> 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 CmsHelpExample {
|
|
|
|
|
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<Criterion> criteria;
|
|
|
|
|
|
|
|
|
|
// 构造函数,初始化criteria列表
|
|
|
|
|
protected GeneratedCriteria() {
|
|
|
|
|
super();
|
|
|
|
|
criteria = new ArrayList<>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查是否有任何查询条件
|
|
|
|
|
public boolean isValid() {
|
|
|
|
|
return criteria.size() > 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取所有查询条件的列表
|
|
|
|
|
public List<Criterion> getAllCriteria() {
|
|
|
|
|
return criteria;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取查询条件的列表(与getAllCriteria相同)
|
|
|
|
|
public List<Criterion> 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 CmsHelpExample {
|
|
|
|
|
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 CmsHelpExample {
|
|
|
|
|
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,6 +128,7 @@ public class CmsHelpExample {
|
|
|
|
|
criteria.add(new Criterion(condition, value1, value2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 以下方法用于生成具体的查询条件,例如id的各种比较操作
|
|
|
|
|
public Criteria andIdIsNull() {
|
|
|
|
|
addCriterion("id is null");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
@ -165,6 +189,7 @@ public class CmsHelpExample {
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 以下方法用于生成category_id的各种比较操作
|
|
|
|
|
public Criteria andCategoryIdIsNull() {
|
|
|
|
|
addCriterion("category_id is null");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
@ -225,321 +250,386 @@ public class CmsHelpExample {
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 以下方法用于生成icon字段的各种比较操作
|
|
|
|
|
public Criteria andIconIsNull() {
|
|
|
|
|
addCriterion("icon is null");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查icon字段是否不为空
|
|
|
|
|
public Criteria andIconIsNotNull() {
|
|
|
|
|
addCriterion("icon is not null");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查icon字段是否等于指定值
|
|
|
|
|
public Criteria andIconEqualTo(String value) {
|
|
|
|
|
addCriterion("icon =", value, "icon");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查icon字段是否不等于指定值
|
|
|
|
|
public Criteria andIconNotEqualTo(String value) {
|
|
|
|
|
addCriterion("icon <>", value, "icon");
|
|
|
|
|
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字段是否匹配指定模式(使用LIKE)
|
|
|
|
|
public Criteria andIconLike(String value) {
|
|
|
|
|
addCriterion("icon like", value, "icon");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查icon字段是否不匹配指定模式(使用NOT LIKE)
|
|
|
|
|
public Criteria andIconNotLike(String value) {
|
|
|
|
|
addCriterion("icon not like", value, "icon");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查icon字段是否在指定列表中
|
|
|
|
|
public Criteria andIconIn(List<String> values) {
|
|
|
|
|
addCriterion("icon in", values, "icon");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查icon字段是否不在指定列表中
|
|
|
|
|
public Criteria andIconNotIn(List<String> values) {
|
|
|
|
|
addCriterion("icon not in", values, "icon");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查icon字段是否在指定范围内(使用BETWEEN)
|
|
|
|
|
public Criteria andIconBetween(String value1, String value2) {
|
|
|
|
|
addCriterion("icon between", value1, value2, "icon");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查icon字段是否不在指定范围内(使用NOT BETWEEN)
|
|
|
|
|
public Criteria andIconNotBetween(String value1, String value2) {
|
|
|
|
|
addCriterion("icon not between", value1, value2, "icon");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查title字段是否为空
|
|
|
|
|
public Criteria andTitleIsNull() {
|
|
|
|
|
addCriterion("title is null");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查title字段是否不为空
|
|
|
|
|
public Criteria andTitleIsNotNull() {
|
|
|
|
|
addCriterion("title is not null");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查title字段是否等于指定值
|
|
|
|
|
public Criteria andTitleEqualTo(String value) {
|
|
|
|
|
addCriterion("title =", value, "title");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查title字段是否不等于指定值
|
|
|
|
|
public Criteria andTitleNotEqualTo(String value) {
|
|
|
|
|
addCriterion("title <>", value, "title");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查title字段是否大于指定值
|
|
|
|
|
public Criteria andTitleGreaterThan(String value) {
|
|
|
|
|
addCriterion("title >", value, "title");
|
|
|
|
|
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字段是否匹配指定模式(使用LIKE)
|
|
|
|
|
public Criteria andTitleLike(String value) {
|
|
|
|
|
addCriterion("title like", value, "title");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查title字段是否不匹配指定模式(使用NOT LIKE)
|
|
|
|
|
public Criteria andTitleNotLike(String value) {
|
|
|
|
|
addCriterion("title not like", value, "title");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查title字段是否在指定列表中
|
|
|
|
|
public Criteria andTitleIn(List<String> values) {
|
|
|
|
|
addCriterion("title in", values, "title");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查title字段是否不在指定列表中
|
|
|
|
|
public Criteria andTitleNotIn(List<String> values) {
|
|
|
|
|
addCriterion("title not in", values, "title");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查title字段是否在指定范围内(使用BETWEEN)
|
|
|
|
|
public Criteria andTitleBetween(String value1, String value2) {
|
|
|
|
|
addCriterion("title between", value1, value2, "title");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查title字段是否不在指定范围内(使用NOT BETWEEN)
|
|
|
|
|
public Criteria andTitleNotBetween(String value1, String value2) {
|
|
|
|
|
addCriterion("title not between", value1, value2, "title");
|
|
|
|
|
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<Integer> values) {
|
|
|
|
|
addCriterion("show_status in", values, "showStatus");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查 show_status 是否不在指定的列表中
|
|
|
|
|
public Criteria andShowStatusNotIn(List<Integer> 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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查 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<Date> values) {
|
|
|
|
|
addCriterion("create_time in", values, "createTime");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查 create_time 是否不在指定的列表中
|
|
|
|
|
public Criteria andCreateTimeNotIn(List<Date> 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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查 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<Integer> values) {
|
|
|
|
|
addCriterion("read_count in", values, "readCount");
|
|
|
|
|
return (Criteria) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检查 read_count 是否不在指定的列表中
|
|
|
|
|
public Criteria andReadCountNotIn(List<Integer> 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;
|
|
|
|
|
@ -547,94 +637,102 @@ public class CmsHelpExample {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class Criteria extends GeneratedCriteria {
|
|
|
|
|
// 默认构造函数,调用父类的构造函数
|
|
|
|
|
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;
|
|
|
|
|
this.typeHandler = null;
|
|
|
|
|
this.noValue = true;
|
|
|
|
|
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作为类型处理器
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|