Commit 3a9fb258 authored by shiyu's avatar shiyu

商品表新增字段

parent 784e593a
package com.wwdz.ch.core.consts;
/**
* 商品种类
*/
public enum ItemTypeEnum {
COIN(1, "钱币"),
NEPHRITE(2, "和田玉"),
;
private int code;
private String des;
ItemTypeEnum(int code, String des) {
this.code = code;
this.des = des;
}
public static String getNameByCode(int code) {
for (ItemTypeEnum itemTypeEnum :ItemTypeEnum.values()) {
if (code == itemTypeEnum.getCode()) {
return itemTypeEnum.getDes();
}
}
return null;
}
public int getCode() {
return code;
}
public String getDes() {
return des;
}
}
......@@ -10,19 +10,19 @@ import lombok.Data;
/**
* @author shiyu
* @date 2023/07/27
* @date 2023/08/15
*/
@Data
public class Item implements Entity {
private Long id;
/**
* 钱币名称
* 商品名称
*/
private String name;
/**
* 钱币所属类目ID
* 商品所属类目ID
*/
private Integer cid;
......@@ -102,15 +102,25 @@ public class Item implements Entity {
private Integer source;
/**
* 钱币额外信息
* 商品种类1钱币
*/
private Integer type;
/**
* 商品额外信息
*/
private String extra;
/**
* 商品图片分号分隔
* 商品图片,分号分隔
*/
private String images;
/**
* 商品视频, 分号分隔
*/
private String vedios;
/**
* 商品详细介绍,是富文本格式
*/
......@@ -147,8 +157,10 @@ public class Item implements Entity {
sb.append(", isSetted=").append(isSetted);
sb.append(", originalSourceUrl=").append(originalSourceUrl);
sb.append(", source=").append(source);
sb.append(", type=").append(type);
sb.append(", extra=").append(extra);
sb.append(", images=").append(images);
sb.append(", vedios=").append(vedios);
sb.append(", detail=").append(detail);
sb.append(", originalExtra=").append(originalExtra);
sb.append(", serialVersionUID=").append(serialVersionUID);
......@@ -186,8 +198,10 @@ public class Item implements Entity {
&& (this.getIsSetted() == null ? other.getIsSetted() == null : this.getIsSetted().equals(other.getIsSetted()))
&& (this.getOriginalSourceUrl() == null ? other.getOriginalSourceUrl() == null : this.getOriginalSourceUrl().equals(other.getOriginalSourceUrl()))
&& (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getExtra() == null ? other.getExtra() == null : this.getExtra().equals(other.getExtra()))
&& (this.getImages() == null ? other.getImages() == null : this.getImages().equals(other.getImages()))
&& (this.getVedios() == null ? other.getVedios() == null : this.getVedios().equals(other.getVedios()))
&& (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail()))
&& (this.getOriginalExtra() == null ? other.getOriginalExtra() == null : this.getOriginalExtra().equals(other.getOriginalExtra()));
}
......@@ -214,8 +228,10 @@ public class Item implements Entity {
result = prime * result + ((getIsSetted() == null) ? 0 : getIsSetted().hashCode());
result = prime * result + ((getOriginalSourceUrl() == null) ? 0 : getOriginalSourceUrl().hashCode());
result = prime * result + ((getSource() == null) ? 0 : getSource().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getExtra() == null) ? 0 : getExtra().hashCode());
result = prime * result + ((getImages() == null) ? 0 : getImages().hashCode());
result = prime * result + ((getVedios() == null) ? 0 : getVedios().hashCode());
result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode());
result = prime * result + ((getOriginalExtra() == null) ? 0 : getOriginalExtra().hashCode());
return result;
......@@ -247,8 +263,10 @@ public class Item implements Entity {
isSetted("is_setted", "isSetted", "INTEGER", false),
originalSourceUrl("original_source_url", "originalSourceUrl", "VARCHAR", false),
source("source", "source", "INTEGER", true),
type("type", "type", "INTEGER", true),
extra("extra", "extra", "LONGVARCHAR", false),
images("images", "images", "LONGVARCHAR", false),
vedios("vedios", "vedios", "LONGVARCHAR", false),
detail("detail", "detail", "LONGVARCHAR", false),
originalExtra("original_extra", "originalExtra", "LONGVARCHAR", false);
......
......@@ -2583,6 +2583,138 @@ public class ItemExample {
addCriterion("`source` not between", value1, value2, "source");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("`type` is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("`type` is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("`type` =", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("`type` = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("`type` <>", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeNotEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("`type` <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("`type` >", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeGreaterThanColumn(Item.Column column) {
addCriterion(new StringBuilder("`type` > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("`type` >=", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeGreaterThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("`type` >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("`type` <", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeLessThanColumn(Item.Column column) {
addCriterion(new StringBuilder("`type` < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("`type` <=", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeLessThanOrEqualToColumn(Item.Column column) {
addCriterion(new StringBuilder("`type` <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("`type` not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("`type` between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("`type` not between", value1, value2, "type");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment