diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReport.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReport.java index 546a615..370c4a0 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReport.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReport.java @@ -4,29 +4,34 @@ import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.util.Date; +/** + * CmsMemberReport 类表示一个会员举报信息。 + * 它包含举报的详细信息,如举报类型、举报人、创建时间等。 + */ public class CmsMemberReport implements Serializable { - private Long id; + private Long id; // 举报的唯一标识符 @ApiModelProperty(value = "举报类型:0->商品评价;1->话题内容;2->用户评论") - private Integer reportType; + private Integer reportType; // 举报的类型 @ApiModelProperty(value = "举报人") - private String reportMemberName; + private String reportMemberName; // 举报人的姓名 - private Date createTime; + private Date createTime; // 举报的创建时间 - private String reportObject; + private String reportObject; // 被举报的对象(如商品ID或评论ID) @ApiModelProperty(value = "举报状态:0->未处理;1->已处理") - private Integer reportStatus; + private Integer reportStatus; // 举报的处理状态 @ApiModelProperty(value = "处理结果:0->无效;1->有效;2->恶意") - private Integer handleStatus; + private Integer handleStatus; // 举报的处理结果 - private String note; + private String note; // 备注信息 - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; // 序列化版本号 + // Getter and Setter methods for each field public Long getId() { return id; } @@ -91,6 +96,7 @@ public class CmsMemberReport implements Serializable { this.note = note; } + // toString method to provide a string representation of the object @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -109,4 +115,4 @@ public class CmsMemberReport implements Serializable { sb.append("]"); return sb.toString(); } -} \ No newline at end of file +} diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReportExample.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReportExample.java index f218943..4d7dfb2 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReportExample.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsMemberReportExample.java @@ -5,46 +5,58 @@ import java.util.Date; import java.util.List; public class CmsMemberReportExample { + // 定义一个用于排序的子句 protected String orderByClause; + // 定义一个布尔值,用于指示查询结果是否去重 protected boolean distinct; + // 定义一个列表,用于存储查询条件(Criteria) protected List oredCriteria; + // 构造函数,初始化oredCriteria为一个新的ArrayList public CmsMemberReportExample() { 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; } + // 添加一个查询条件到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) { @@ -53,37 +65,46 @@ public class CmsMemberReportExample { 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; } + // 获取查询条件列表的方法(与getAllCriteria方法相同) 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 CmsMemberReportExample { 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 CmsMemberReportExample { criteria.add(new Criterion(condition, value)); } + // 添加区间查询条件的方法 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,606 +128,720 @@ public class CmsMemberReportExample { criteria.add(new Criterion(condition, value1, value2)); } + // 添加id为空的查询条件的方法 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; } + // 添加report_type为空的查询条件的方法 public Criteria andReportTypeIsNull() { addCriterion("report_type is null"); return (Criteria) this; } + // 添加report_type不为空的查询条件的方法 public Criteria andReportTypeIsNotNull() { addCriterion("report_type is not null"); return (Criteria) this; } + // 添加report_type等于指定值的查询条件的方法 public Criteria andReportTypeEqualTo(Integer value) { addCriterion("report_type =", value, "reportType"); return (Criteria) this; } + // 添加report_type不等于指定值的查询条件的方法 public Criteria andReportTypeNotEqualTo(Integer value) { addCriterion("report_type <>", value, "reportType"); return (Criteria) this; } + // 添加report_type大于指定值的查询条件的方法 public Criteria andReportTypeGreaterThan(Integer value) { addCriterion("report_type >", value, "reportType"); return (Criteria) this; } + // 添加report_type大于等于指定值的查询条件的方法 public Criteria andReportTypeGreaterThanOrEqualTo(Integer value) { addCriterion("report_type >=", value, "reportType"); return (Criteria) this; } + // 添加report_type小于指定值的查询条件的方法 public Criteria andReportTypeLessThan(Integer value) { addCriterion("report_type <", value, "reportType"); return (Criteria) this; } + + // 添加 report_type <= value 的条件 public Criteria andReportTypeLessThanOrEqualTo(Integer value) { addCriterion("report_type <=", value, "reportType"); return (Criteria) this; } + // 添加 report_type in (values) 的条件 public Criteria andReportTypeIn(List values) { addCriterion("report_type in", values, "reportType"); return (Criteria) this; } + // 添加 report_type not in (values) 的条件 public Criteria andReportTypeNotIn(List values) { addCriterion("report_type not in", values, "reportType"); return (Criteria) this; } + // 添加 report_type between value1 and value2 的条件 public Criteria andReportTypeBetween(Integer value1, Integer value2) { addCriterion("report_type between", value1, value2, "reportType"); return (Criteria) this; } + // 添加 report_type not between value1 and value2 的条件 public Criteria andReportTypeNotBetween(Integer value1, Integer value2) { addCriterion("report_type not between", value1, value2, "reportType"); return (Criteria) this; } + // 添加 report_member_name is null 的条件 public Criteria andReportMemberNameIsNull() { addCriterion("report_member_name is null"); return (Criteria) this; } + // 添加 report_member_name is not null 的条件 public Criteria andReportMemberNameIsNotNull() { addCriterion("report_member_name is not null"); return (Criteria) this; } + // 添加 report_member_name = value 的条件 public Criteria andReportMemberNameEqualTo(String value) { addCriterion("report_member_name =", value, "reportMemberName"); return (Criteria) this; } + // 添加 report_member_name <> value 的条件 public Criteria andReportMemberNameNotEqualTo(String value) { addCriterion("report_member_name <>", value, "reportMemberName"); return (Criteria) this; } + // 添加 report_member_name > value 的条件 public Criteria andReportMemberNameGreaterThan(String value) { addCriterion("report_member_name >", value, "reportMemberName"); return (Criteria) this; } + // 添加 report_member_name >= value 的条件 public Criteria andReportMemberNameGreaterThanOrEqualTo(String value) { addCriterion("report_member_name >=", value, "reportMemberName"); return (Criteria) this; } + // 添加 report_member_name < value 的条件 public Criteria andReportMemberNameLessThan(String value) { addCriterion("report_member_name <", value, "reportMemberName"); return (Criteria) this; } + // 添加 report_member_name <= value 的条件 public Criteria andReportMemberNameLessThanOrEqualTo(String value) { addCriterion("report_member_name <=", value, "reportMemberName"); return (Criteria) this; } + // 添加 report_member_name like value 的条件 public Criteria andReportMemberNameLike(String value) { addCriterion("report_member_name like", value, "reportMemberName"); return (Criteria) this; } + // 添加 report_member_name not like value 的条件 public Criteria andReportMemberNameNotLike(String value) { addCriterion("report_member_name not like", value, "reportMemberName"); return (Criteria) this; } + // 添加 report_member_name in (values) 的条件 public Criteria andReportMemberNameIn(List values) { addCriterion("report_member_name in", values, "reportMemberName"); return (Criteria) this; } + // 添加 report_member_name not in (values) 的条件 public Criteria andReportMemberNameNotIn(List values) { addCriterion("report_member_name not in", values, "reportMemberName"); return (Criteria) this; } + // 添加 report_member_name between value1 and value2 的条件 public Criteria andReportMemberNameBetween(String value1, String value2) { addCriterion("report_member_name between", value1, value2, "reportMemberName"); return (Criteria) this; } + // 添加 report_member_name not between value1 and value2 的条件 public Criteria andReportMemberNameNotBetween(String value1, String value2) { addCriterion("report_member_name not between", value1, value2, "reportMemberName"); return (Criteria) this; } + // 添加 create_time is null 的条件 public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; } + // 添加 create_time is not null 的条件 public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } + // 添加 create_time = value 的条件 public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } + // 添加 create_time <> value 的条件 public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } + // 添加 create_time > value 的条件 public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } + // 添加 create_time >= value 的条件 public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } + // 添加 create_time < value 的条件 public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } + // 添加 create_time <= value 的条件 public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } + // 添加 create_time in (values) 的条件 public Criteria andCreateTimeIn(List values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } + // 添加 create_time not in (values) 的条件 public Criteria andCreateTimeNotIn(List values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } + + // 添加创建时间在指定范围内的条件 public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } + // 添加创建时间不在指定范围内的条件 public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } + // 添加报告对象为空的条件 public Criteria andReportObjectIsNull() { addCriterion("report_object is null"); return (Criteria) this; } + // 添加报告对象不为空的条件 public Criteria andReportObjectIsNotNull() { addCriterion("report_object is not null"); return (Criteria) this; } + // 添加报告对象等于指定值的条件 public Criteria andReportObjectEqualTo(String value) { addCriterion("report_object =", value, "reportObject"); return (Criteria) this; } + // 添加报告对象不等于指定值的条件 public Criteria andReportObjectNotEqualTo(String value) { addCriterion("report_object <>", value, "reportObject"); return (Criteria) this; } + // 添加报告对象大于指定值的条件 public Criteria andReportObjectGreaterThan(String value) { addCriterion("report_object >", value, "reportObject"); return (Criteria) this; } + // 添加报告对象大于或等于指定值的条件 public Criteria andReportObjectGreaterThanOrEqualTo(String value) { addCriterion("report_object >=", value, "reportObject"); return (Criteria) this; } + // 添加报告对象小于指定值的条件 public Criteria andReportObjectLessThan(String value) { addCriterion("report_object <", value, "reportObject"); return (Criteria) this; } + // 添加报告对象小于或等于指定值的条件 public Criteria andReportObjectLessThanOrEqualTo(String value) { addCriterion("report_object <=", value, "reportObject"); return (Criteria) this; } + // 添加报告对象匹配指定模式的条件 public Criteria andReportObjectLike(String value) { addCriterion("report_object like", value, "reportObject"); return (Criteria) this; } + // 添加报告对象不匹配指定模式的条件 public Criteria andReportObjectNotLike(String value) { addCriterion("report_object not like", value, "reportObject"); return (Criteria) this; } + // 添加报告对象在指定列表中的条件 public Criteria andReportObjectIn(List values) { addCriterion("report_object in", values, "reportObject"); return (Criteria) this; } + // 添加报告对象不在指定列表中的条件 public Criteria andReportObjectNotIn(List values) { addCriterion("report_object not in", values, "reportObject"); return (Criteria) this; } + // 添加报告对象在指定范围内的条件 public Criteria andReportObjectBetween(String value1, String value2) { addCriterion("report_object between", value1, value2, "reportObject"); return (Criteria) this; } + // 添加报告对象不在指定范围内的条件 public Criteria andReportObjectNotBetween(String value1, String value2) { addCriterion("report_object not between", value1, value2, "reportObject"); return (Criteria) this; } + // 添加报告状态为空的条件 public Criteria andReportStatusIsNull() { addCriterion("report_status is null"); return (Criteria) this; } + // 添加报告状态不为空的条件 public Criteria andReportStatusIsNotNull() { addCriterion("report_status is not null"); return (Criteria) this; } + // 添加报告状态等于指定值的条件 public Criteria andReportStatusEqualTo(Integer value) { addCriterion("report_status =", value, "reportStatus"); return (Criteria) this; } + // 添加报告状态不等于指定值的条件 public Criteria andReportStatusNotEqualTo(Integer value) { addCriterion("report_status <>", value, "reportStatus"); return (Criteria) this; } + // 添加报告状态大于指定值的条件 public Criteria andReportStatusGreaterThan(Integer value) { addCriterion("report_status >", value, "reportStatus"); return (Criteria) this; } + // 添加报告状态大于或等于指定值的条件 public Criteria andReportStatusGreaterThanOrEqualTo(Integer value) { addCriterion("report_status >=", value, "reportStatus"); return (Criteria) this; } + // 添加报告状态小于指定值的条件 public Criteria andReportStatusLessThan(Integer value) { addCriterion("report_status <", value, "reportStatus"); return (Criteria) this; } + // 添加报告状态小于或等于指定值的条件 public Criteria andReportStatusLessThanOrEqualTo(Integer value) { addCriterion("report_status <=", value, "reportStatus"); return (Criteria) this; } + // 添加报告状态在指定列表中的条件 public Criteria andReportStatusIn(List values) { addCriterion("report_status in", values, "reportStatus"); return (Criteria) this; } + // 添加报告状态不在指定列表中的条件 public Criteria andReportStatusNotIn(List values) { addCriterion("report_status not in", values, "reportStatus"); return (Criteria) this; } + // 添加报告状态在指定范围内的条件 public Criteria andReportStatusBetween(Integer value1, Integer value2) { addCriterion("report_status between", value1, value2, "reportStatus"); return (Criteria) this; } + // 添加报告状态不在指定范围内的条件 public Criteria andReportStatusNotBetween(Integer value1, Integer value2) { addCriterion("report_status not between", value1, value2, "reportStatus"); return (Criteria) this; } + // 添加处理状态为空的条件 public Criteria andHandleStatusIsNull() { addCriterion("handle_status is null"); return (Criteria) this; } + // 添加处理状态不为空的条件 public Criteria andHandleStatusIsNotNull() { addCriterion("handle_status is not null"); return (Criteria) this; } + // 添加处理状态等于指定值的条件 public Criteria andHandleStatusEqualTo(Integer value) { addCriterion("handle_status =", value, "handleStatus"); return (Criteria) this; } + // 添加处理状态不等于指定值的条件 public Criteria andHandleStatusNotEqualTo(Integer value) { addCriterion("handle_status <>", value, "handleStatus"); return (Criteria) this; } + + // 添加条件:handle_status > value public Criteria andHandleStatusGreaterThan(Integer value) { addCriterion("handle_status >", value, "handleStatus"); return (Criteria) this; } + // 添加条件:handle_status >= value public Criteria andHandleStatusGreaterThanOrEqualTo(Integer value) { addCriterion("handle_status >=", value, "handleStatus"); return (Criteria) this; } + // 添加条件:handle_status < value public Criteria andHandleStatusLessThan(Integer value) { addCriterion("handle_status <", value, "handleStatus"); return (Criteria) this; } + // 添加条件:handle_status <= value public Criteria andHandleStatusLessThanOrEqualTo(Integer value) { addCriterion("handle_status <=", value, "handleStatus"); return (Criteria) this; } + // 添加条件:handle_status in values public Criteria andHandleStatusIn(List values) { addCriterion("handle_status in", values, "handleStatus"); return (Criteria) this; } + // 添加条件:handle_status not in values public Criteria andHandleStatusNotIn(List values) { addCriterion("handle_status not in", values, "handleStatus"); return (Criteria) this; } + // 添加条件:handle_status between value1 and value2 public Criteria andHandleStatusBetween(Integer value1, Integer value2) { addCriterion("handle_status between", value1, value2, "handleStatus"); return (Criteria) this; } + // 添加条件:handle_status not between value1 and value2 public Criteria andHandleStatusNotBetween(Integer value1, Integer value2) { addCriterion("handle_status not between", value1, value2, "handleStatus"); return (Criteria) this; } + // 添加条件:note is null public Criteria andNoteIsNull() { addCriterion("note is null"); return (Criteria) this; } + // 添加条件:note is not null public Criteria andNoteIsNotNull() { addCriterion("note is not null"); return (Criteria) this; } + // 添加条件:note = value public Criteria andNoteEqualTo(String value) { addCriterion("note =", value, "note"); return (Criteria) this; } + // 添加条件:note <> value public Criteria andNoteNotEqualTo(String value) { addCriterion("note <>", value, "note"); return (Criteria) this; } + // 添加条件:note > value public Criteria andNoteGreaterThan(String value) { addCriterion("note >", value, "note"); return (Criteria) this; } + // 添加条件:note >= value public Criteria andNoteGreaterThanOrEqualTo(String value) { addCriterion("note >=", value, "note"); return (Criteria) this; } + // 添加条件:note < value public Criteria andNoteLessThan(String value) { addCriterion("note <", value, "note"); return (Criteria) this; } + // 添加条件:note <= value public Criteria andNoteLessThanOrEqualTo(String value) { addCriterion("note <=", value, "note"); return (Criteria) this; } + // 添加条件:note like value public Criteria andNoteLike(String value) { addCriterion("note like", value, "note"); return (Criteria) this; } + // 添加条件:note not like value public Criteria andNoteNotLike(String value) { addCriterion("note not like", value, "note"); return (Criteria) this; } + // 添加条件:note in values public Criteria andNoteIn(List values) { addCriterion("note in", values, "note"); return (Criteria) this; } + // 添加条件:note not in values public Criteria andNoteNotIn(List values) { addCriterion("note not in", values, "note"); return (Criteria) this; } + // 添加条件:note between value1 and value2 public Criteria andNoteBetween(String value1, String value2) { addCriterion("note between", value1, value2, "note"); return (Criteria) this; } + // 添加条件:note not between value1 and value2 public Criteria andNoteNotBetween(String value1, String value2) { addCriterion("note not between", value1, value2, "note"); return (Criteria) this; } + } 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; // 是否是between查询 + 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; } + // 判断是否是between查询 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作为类型处理器 } + // 构造函数,包含条件表达式、两个值和可选的类型处理器,用于between查询 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; // 表示这是一个between查询 } + // 构造函数,包含条件表达式、两个值,不包含类型处理器,用于between查询 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/CmsPrefrenceArea.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceArea.java index 424d073..2b37d44 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceArea.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceArea.java @@ -3,22 +3,26 @@ package com.macro.mall.model; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; +/** + * CmsPrefrenceArea 实体类,用于表示CMS首选项区域。 + */ public class CmsPrefrenceArea implements Serializable { - private Long id; + private Long id; // 主键ID - private String name; + private String name; // 名称 - private String subTitle; + private String subTitle; // 副标题 - private Integer sort; + private Integer sort; // 排序 - private Integer showStatus; + private Integer showStatus; // 显示状态 @ApiModelProperty(value = "展示图片") - private byte[] pic; + private byte[] pic; // 展示图片,以字节数组形式存储 - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; // 序列化版本号 + // Getter和Setter方法 public Long getId() { return id; } @@ -67,6 +71,7 @@ public class CmsPrefrenceArea implements Serializable { this.pic = pic; } + // toString方法,用于生成对象的字符串表示形式 @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -83,4 +88,4 @@ public class CmsPrefrenceArea implements Serializable { sb.append("]"); return sb.toString(); } -} \ No newline at end of file +} diff --git a/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceAreaExample.java b/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceAreaExample.java index 92b11ea..5d623b4 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceAreaExample.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/CmsPrefrenceAreaExample.java @@ -4,46 +4,58 @@ import java.util.ArrayList; import java.util.List; public class CmsPrefrenceAreaExample { + // 定义一个用于排序的子句 protected String orderByClause; + // 定义一个布尔值,用于指示查询是否使用 DISTINCT 关键字 protected boolean distinct; + // 定义一个 Criteria 对象的列表,用于存储查询条件 protected List oredCriteria; + // 构造函数,初始化 oredCriteria 列表 public CmsPrefrenceAreaExample() { 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 CmsPrefrenceAreaExample { 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 { + // 定义一个Criterion对象的列表,用于存储查询条件 protected List criteria; + // 构造函数,初始化criteria列表 protected GeneratedCriteria() { super(); criteria = new ArrayList<>(); } + // 判断是否有有效的查询条件 public boolean isValid() { return criteria.size() > 0; } + // 获取所有的查询条件 public List getAllCriteria() { return criteria; } + // 获取所有的查询条件(与getAllCriteria方法功能相同) public List getCriteria() { return criteria; } + // 添加一个简单的查询条件 protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); @@ -90,6 +111,7 @@ public class CmsPrefrenceAreaExample { 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"); @@ -97,6 +119,7 @@ public class CmsPrefrenceAreaExample { 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"); @@ -104,6 +127,8 @@ public class CmsPrefrenceAreaExample { criteria.add(new Criterion(condition, value1, value2)); } +// 以下方法用于生成具体的查询条件,例如id和name的各种比较操作 + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; @@ -224,262 +249,308 @@ public class CmsPrefrenceAreaExample { return (Criteria) this; } + + // 检查name字段是否在给定的两个值之间 public Criteria andNameBetween(String value1, String value2) { addCriterion("name between", value1, value2, "name"); return (Criteria) this; } + // 检查name字段是否不在给定的两个值之间 public Criteria andNameNotBetween(String value1, String value2) { addCriterion("name not between", value1, value2, "name"); return (Criteria) this; } + // 检查sub_title字段是否为空 public Criteria andSubTitleIsNull() { addCriterion("sub_title is null"); return (Criteria) this; } + // 检查sub_title字段是否不为空 public Criteria andSubTitleIsNotNull() { addCriterion("sub_title is not null"); return (Criteria) this; } + // 检查sub_title字段是否等于给定的值 public Criteria andSubTitleEqualTo(String value) { addCriterion("sub_title =", value, "subTitle"); return (Criteria) this; } + // 检查sub_title字段是否不等于给定的值 public Criteria andSubTitleNotEqualTo(String value) { addCriterion("sub_title <>", value, "subTitle"); return (Criteria) this; } + // 检查sub_title字段是否大于给定的值 public Criteria andSubTitleGreaterThan(String value) { addCriterion("sub_title >", value, "subTitle"); return (Criteria) this; } + // 检查sub_title字段是否大于或等于给定的值 public Criteria andSubTitleGreaterThanOrEqualTo(String value) { addCriterion("sub_title >=", value, "subTitle"); return (Criteria) this; } + // 检查sub_title字段是否小于给定的值 public Criteria andSubTitleLessThan(String value) { addCriterion("sub_title <", value, "subTitle"); return (Criteria) this; } + // 检查sub_title字段是否小于或等于给定的值 public Criteria andSubTitleLessThanOrEqualTo(String value) { addCriterion("sub_title <=", value, "subTitle"); return (Criteria) this; } + // 检查sub_title字段是否包含给定的值(模糊匹配) public Criteria andSubTitleLike(String value) { addCriterion("sub_title like", value, "subTitle"); return (Criteria) this; } + // 检查sub_title字段是否不包含给定的值(模糊匹配) public Criteria andSubTitleNotLike(String value) { addCriterion("sub_title not like", value, "subTitle"); return (Criteria) this; } + // 检查sub_title字段是否在给定的值列表中 public Criteria andSubTitleIn(List values) { addCriterion("sub_title in", values, "subTitle"); return (Criteria) this; } + // 检查sub_title字段是否不在给定的值列表中 public Criteria andSubTitleNotIn(List values) { addCriterion("sub_title not in", values, "subTitle"); return (Criteria) this; } + // 检查sub_title字段是否在给定的两个值之间 public Criteria andSubTitleBetween(String value1, String value2) { addCriterion("sub_title between", value1, value2, "subTitle"); return (Criteria) this; } + // 检查sub_title字段是否不在给定的两个值之间 public Criteria andSubTitleNotBetween(String value1, String value2) { addCriterion("sub_title not between", value1, value2, "subTitle"); 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字段是否大于或等于给定的值 public Criteria andSortGreaterThanOrEqualTo(Integer value) { addCriterion("sort >=", value, "sort"); return (Criteria) this; } + // 检查sort字段是否小于给定的值 public Criteria andSortLessThan(Integer value) { addCriterion("sort <", value, "sort"); return (Criteria) this; } + // 检查sort字段是否小于或等于给定的值 public Criteria andSortLessThanOrEqualTo(Integer value) { addCriterion("sort <=", value, "sort"); return (Criteria) this; } + // 检查sort字段是否在给定的值列表中 public Criteria andSortIn(List values) { addCriterion("sort in", values, "sort"); return (Criteria) this; } + // 检查sort字段是否不在给定的值列表中 public Criteria andSortNotIn(List values) { addCriterion("sort not in", values, "sort"); return (Criteria) this; } + // 检查sort字段是否在给定的两个值之间 public Criteria andSortBetween(Integer value1, Integer value2) { addCriterion("sort between", value1, value2, "sort"); return (Criteria) this; } + // 检查sort字段是否不在给定的两个值之间 public Criteria andSortNotBetween(Integer value1, Integer value2) { addCriterion("sort not between", value1, value2, "sort"); 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; } + public Criteria andShowStatusIn(List values) { + // 添加条件:show_status 在指定的值列表中 addCriterion("show_status in", values, "showStatus"); return (Criteria) this; } public Criteria andShowStatusNotIn(List values) { + // 添加条件:show_status 不在指定的值列表中 addCriterion("show_status not in", values, "showStatus"); return (Criteria) this; } public Criteria andShowStatusBetween(Integer value1, Integer value2) { + // 添加条件:show_status 在指定的两个值之间(包含边界) addCriterion("show_status between", value1, value2, "showStatus"); return (Criteria) this; } public Criteria andShowStatusNotBetween(Integer value1, Integer value2) { + // 添加条件:show_status 不在指定的两个值之间(不包含边界) addCriterion("show_status not between", value1, value2, "showStatus"); 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; @@ -487,33 +558,38 @@ public class CmsPrefrenceAreaExample { 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); } + // 构造函数,包含条件表达式、两个值和类型处理器 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); } } + } \ No newline at end of file