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; ...@@ -10,19 +10,19 @@ import lombok.Data;
/** /**
* @author shiyu * @author shiyu
* @date 2023/07/27 * @date 2023/08/15
*/ */
@Data @Data
public class Item implements Entity { public class Item implements Entity {
private Long id; private Long id;
/** /**
* 钱币名称 * 商品名称
*/ */
private String name; private String name;
/** /**
* 钱币所属类目ID * 商品所属类目ID
*/ */
private Integer cid; private Integer cid;
...@@ -102,15 +102,25 @@ public class Item implements Entity { ...@@ -102,15 +102,25 @@ public class Item implements Entity {
private Integer source; private Integer source;
/** /**
* 钱币额外信息 * 商品种类1钱币
*/
private Integer type;
/**
* 商品额外信息
*/ */
private String extra; private String extra;
/** /**
* 商品图片分号分隔 * 商品图片,分号分隔
*/ */
private String images; private String images;
/**
* 商品视频, 分号分隔
*/
private String vedios;
/** /**
* 商品详细介绍,是富文本格式 * 商品详细介绍,是富文本格式
*/ */
...@@ -147,8 +157,10 @@ public class Item implements Entity { ...@@ -147,8 +157,10 @@ public class Item implements Entity {
sb.append(", isSetted=").append(isSetted); sb.append(", isSetted=").append(isSetted);
sb.append(", originalSourceUrl=").append(originalSourceUrl); sb.append(", originalSourceUrl=").append(originalSourceUrl);
sb.append(", source=").append(source); sb.append(", source=").append(source);
sb.append(", type=").append(type);
sb.append(", extra=").append(extra); sb.append(", extra=").append(extra);
sb.append(", images=").append(images); sb.append(", images=").append(images);
sb.append(", vedios=").append(vedios);
sb.append(", detail=").append(detail); sb.append(", detail=").append(detail);
sb.append(", originalExtra=").append(originalExtra); sb.append(", originalExtra=").append(originalExtra);
sb.append(", serialVersionUID=").append(serialVersionUID); sb.append(", serialVersionUID=").append(serialVersionUID);
...@@ -186,8 +198,10 @@ public class Item implements Entity { ...@@ -186,8 +198,10 @@ public class Item implements Entity {
&& (this.getIsSetted() == null ? other.getIsSetted() == null : this.getIsSetted().equals(other.getIsSetted())) && (this.getIsSetted() == null ? other.getIsSetted() == null : this.getIsSetted().equals(other.getIsSetted()))
&& (this.getOriginalSourceUrl() == null ? other.getOriginalSourceUrl() == null : this.getOriginalSourceUrl().equals(other.getOriginalSourceUrl())) && (this.getOriginalSourceUrl() == null ? other.getOriginalSourceUrl() == null : this.getOriginalSourceUrl().equals(other.getOriginalSourceUrl()))
&& (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource())) && (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.getExtra() == null ? other.getExtra() == null : this.getExtra().equals(other.getExtra()))
&& (this.getImages() == null ? other.getImages() == null : this.getImages().equals(other.getImages())) && (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.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail()))
&& (this.getOriginalExtra() == null ? other.getOriginalExtra() == null : this.getOriginalExtra().equals(other.getOriginalExtra())); && (this.getOriginalExtra() == null ? other.getOriginalExtra() == null : this.getOriginalExtra().equals(other.getOriginalExtra()));
} }
...@@ -214,8 +228,10 @@ public class Item implements Entity { ...@@ -214,8 +228,10 @@ public class Item implements Entity {
result = prime * result + ((getIsSetted() == null) ? 0 : getIsSetted().hashCode()); result = prime * result + ((getIsSetted() == null) ? 0 : getIsSetted().hashCode());
result = prime * result + ((getOriginalSourceUrl() == null) ? 0 : getOriginalSourceUrl().hashCode()); result = prime * result + ((getOriginalSourceUrl() == null) ? 0 : getOriginalSourceUrl().hashCode());
result = prime * result + ((getSource() == null) ? 0 : getSource().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 + ((getExtra() == null) ? 0 : getExtra().hashCode());
result = prime * result + ((getImages() == null) ? 0 : getImages().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 + ((getDetail() == null) ? 0 : getDetail().hashCode());
result = prime * result + ((getOriginalExtra() == null) ? 0 : getOriginalExtra().hashCode()); result = prime * result + ((getOriginalExtra() == null) ? 0 : getOriginalExtra().hashCode());
return result; return result;
...@@ -247,8 +263,10 @@ public class Item implements Entity { ...@@ -247,8 +263,10 @@ public class Item implements Entity {
isSetted("is_setted", "isSetted", "INTEGER", false), isSetted("is_setted", "isSetted", "INTEGER", false),
originalSourceUrl("original_source_url", "originalSourceUrl", "VARCHAR", false), originalSourceUrl("original_source_url", "originalSourceUrl", "VARCHAR", false),
source("source", "source", "INTEGER", true), source("source", "source", "INTEGER", true),
type("type", "type", "INTEGER", true),
extra("extra", "extra", "LONGVARCHAR", false), extra("extra", "extra", "LONGVARCHAR", false),
images("images", "images", "LONGVARCHAR", false), images("images", "images", "LONGVARCHAR", false),
vedios("vedios", "vedios", "LONGVARCHAR", false),
detail("detail", "detail", "LONGVARCHAR", false), detail("detail", "detail", "LONGVARCHAR", false),
originalExtra("original_extra", "originalExtra", "LONGVARCHAR", false); originalExtra("original_extra", "originalExtra", "LONGVARCHAR", false);
......
...@@ -2583,6 +2583,138 @@ public class ItemExample { ...@@ -2583,6 +2583,138 @@ public class ItemExample {
addCriterion("`source` not between", value1, value2, "source"); addCriterion("`source` not between", value1, value2, "source");
return (Criteria) this; 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 { public static class Criteria extends GeneratedCriteria {
......
...@@ -20,10 +20,12 @@ ...@@ -20,10 +20,12 @@
<result column="is_setted" jdbcType="INTEGER" property="isSetted" /> <result column="is_setted" jdbcType="INTEGER" property="isSetted" />
<result column="original_source_url" jdbcType="VARCHAR" property="originalSourceUrl" /> <result column="original_source_url" jdbcType="VARCHAR" property="originalSourceUrl" />
<result column="source" jdbcType="INTEGER" property="source" /> <result column="source" jdbcType="INTEGER" property="source" />
<result column="type" jdbcType="INTEGER" property="type" />
</resultMap> </resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.wwdz.ch.db.domain.Item"> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.wwdz.ch.db.domain.Item">
<result column="extra" jdbcType="LONGVARCHAR" property="extra" /> <result column="extra" jdbcType="LONGVARCHAR" property="extra" />
<result column="images" jdbcType="LONGVARCHAR" property="images" /> <result column="images" jdbcType="LONGVARCHAR" property="images" />
<result column="vedios" jdbcType="LONGVARCHAR" property="vedios" />
<result column="detail" jdbcType="LONGVARCHAR" property="detail" /> <result column="detail" jdbcType="LONGVARCHAR" property="detail" />
<result column="original_extra" jdbcType="LONGVARCHAR" property="originalExtra" /> <result column="original_extra" jdbcType="LONGVARCHAR" property="originalExtra" />
</resultMap> </resultMap>
...@@ -88,10 +90,10 @@ ...@@ -88,10 +90,10 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url, source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
`source` `source`, `type`
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
extra, images, detail, original_extra extra, images, vedios, detail, original_extra
</sql> </sql>
<select id="selectByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.ItemExample" resultMap="ResultMapWithBLOBs"> <select id="selectByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.ItemExample" resultMap="ResultMapWithBLOBs">
select select
...@@ -145,7 +147,7 @@ ...@@ -145,7 +147,7 @@
<otherwise> <otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url, source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
`source`, extra, images, detail, original_extra `source`, `type`, extra, images, vedios, detail, original_extra
</otherwise> </otherwise>
</choose> </choose>
from item from item
...@@ -180,7 +182,7 @@ ...@@ -180,7 +182,7 @@
<otherwise> <otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url, source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
`source`, extra, images, detail, original_extra `source`, `type`, extra, images, vedios, detail, original_extra
</otherwise> </otherwise>
</choose> </choose>
from item from item
...@@ -200,22 +202,22 @@ ...@@ -200,22 +202,22 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into item (`name`, cid, is_on_sale, insert into item (`name`, cid, is_on_sale,
is_std, sort, share_image, is_std, sort, share_image,
top_image, price, create_time, top_image, price, create_time,
source_type, update_time, is_deleted, source_type, update_time, is_deleted,
bid_time, remark, is_setted, bid_time, remark, is_setted,
original_source_url, `source`, extra, original_source_url, `source`, `type`,
images, detail, original_extra extra, images, vedios,
) detail, original_extra)
values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT}, values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT},
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR}, #{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}, #{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isSetted,jdbcType=INTEGER}, #{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isSetted,jdbcType=INTEGER},
#{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{extra,jdbcType=LONGVARCHAR}, #{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
#{images,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR} #{extra,jdbcType=LONGVARCHAR}, #{images,jdbcType=LONGVARCHAR}, #{vedios,jdbcType=LONGVARCHAR},
) #{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.Item"> <insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.Item">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
...@@ -274,12 +276,18 @@ ...@@ -274,12 +276,18 @@
<if test="source != null"> <if test="source != null">
`source`, `source`,
</if> </if>
<if test="type != null">
`type`,
</if>
<if test="extra != null"> <if test="extra != null">
extra, extra,
</if> </if>
<if test="images != null"> <if test="images != null">
images, images,
</if> </if>
<if test="vedios != null">
vedios,
</if>
<if test="detail != null"> <if test="detail != null">
detail, detail,
</if> </if>
...@@ -339,12 +347,18 @@ ...@@ -339,12 +347,18 @@
<if test="source != null"> <if test="source != null">
#{source,jdbcType=INTEGER}, #{source,jdbcType=INTEGER},
</if> </if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="extra != null"> <if test="extra != null">
#{extra,jdbcType=LONGVARCHAR}, #{extra,jdbcType=LONGVARCHAR},
</if> </if>
<if test="images != null"> <if test="images != null">
#{images,jdbcType=LONGVARCHAR}, #{images,jdbcType=LONGVARCHAR},
</if> </if>
<if test="vedios != null">
#{vedios,jdbcType=LONGVARCHAR},
</if>
<if test="detail != null"> <if test="detail != null">
#{detail,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -416,12 +430,18 @@ ...@@ -416,12 +430,18 @@
<if test="record.source != null"> <if test="record.source != null">
`source` = #{record.source,jdbcType=INTEGER}, `source` = #{record.source,jdbcType=INTEGER},
</if> </if>
<if test="record.type != null">
`type` = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.extra != null"> <if test="record.extra != null">
extra = #{record.extra,jdbcType=LONGVARCHAR}, extra = #{record.extra,jdbcType=LONGVARCHAR},
</if> </if>
<if test="record.images != null"> <if test="record.images != null">
images = #{record.images,jdbcType=LONGVARCHAR}, images = #{record.images,jdbcType=LONGVARCHAR},
</if> </if>
<if test="record.vedios != null">
vedios = #{record.vedios,jdbcType=LONGVARCHAR},
</if>
<if test="record.detail != null"> <if test="record.detail != null">
detail = #{record.detail,jdbcType=LONGVARCHAR}, detail = #{record.detail,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -453,8 +473,10 @@ ...@@ -453,8 +473,10 @@
is_setted = #{record.isSetted,jdbcType=INTEGER}, is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER}, `source` = #{record.source,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER},
extra = #{record.extra,jdbcType=LONGVARCHAR}, extra = #{record.extra,jdbcType=LONGVARCHAR},
images = #{record.images,jdbcType=LONGVARCHAR}, images = #{record.images,jdbcType=LONGVARCHAR},
vedios = #{record.vedios,jdbcType=LONGVARCHAR},
detail = #{record.detail,jdbcType=LONGVARCHAR}, detail = #{record.detail,jdbcType=LONGVARCHAR},
original_extra = #{record.originalExtra,jdbcType=LONGVARCHAR} original_extra = #{record.originalExtra,jdbcType=LONGVARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -480,7 +502,8 @@ ...@@ -480,7 +502,8 @@
remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER}, is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER} `source` = #{record.source,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -539,12 +562,18 @@ ...@@ -539,12 +562,18 @@
<if test="source != null"> <if test="source != null">
`source` = #{source,jdbcType=INTEGER}, `source` = #{source,jdbcType=INTEGER},
</if> </if>
<if test="type != null">
`type` = #{type,jdbcType=INTEGER},
</if>
<if test="extra != null"> <if test="extra != null">
extra = #{extra,jdbcType=LONGVARCHAR}, extra = #{extra,jdbcType=LONGVARCHAR},
</if> </if>
<if test="images != null"> <if test="images != null">
images = #{images,jdbcType=LONGVARCHAR}, images = #{images,jdbcType=LONGVARCHAR},
</if> </if>
<if test="vedios != null">
vedios = #{vedios,jdbcType=LONGVARCHAR},
</if>
<if test="detail != null"> <if test="detail != null">
detail = #{detail,jdbcType=LONGVARCHAR}, detail = #{detail,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -573,8 +602,10 @@ ...@@ -573,8 +602,10 @@
is_setted = #{isSetted,jdbcType=INTEGER}, is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER}, `source` = #{source,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER},
extra = #{extra,jdbcType=LONGVARCHAR}, extra = #{extra,jdbcType=LONGVARCHAR},
images = #{images,jdbcType=LONGVARCHAR}, images = #{images,jdbcType=LONGVARCHAR},
vedios = #{vedios,jdbcType=LONGVARCHAR},
detail = #{detail,jdbcType=LONGVARCHAR}, detail = #{detail,jdbcType=LONGVARCHAR},
original_extra = #{originalExtra,jdbcType=LONGVARCHAR} original_extra = #{originalExtra,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
...@@ -597,7 +628,8 @@ ...@@ -597,7 +628,8 @@
remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER}, is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR}, original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER} `source` = #{source,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.ItemExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.ItemExample" resultMap="BaseResultMap">
...@@ -655,7 +687,7 @@ ...@@ -655,7 +687,7 @@
<otherwise> <otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time, id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url, source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
`source`, extra, images, detail, original_extra `source`, `type`, extra, images, vedios, detail, original_extra
</otherwise> </otherwise>
</choose> </choose>
from item from item
...@@ -667,4 +699,550 @@ ...@@ -667,4 +699,550 @@
</if> </if>
limit 1 limit 1
</select> </select>
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.Item">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="cid" jdbcType="INTEGER" property="cid" />
<result column="is_on_sale" jdbcType="BIT" property="isOnSale" />
<result column="is_std" jdbcType="BIT" property="isStd" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="share_image" jdbcType="VARCHAR" property="shareImage" />
<result column="top_image" jdbcType="VARCHAR" property="topImage" />
<result column="price" jdbcType="BIGINT" property="price" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="source_type" jdbcType="INTEGER" property="sourceType" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_deleted" jdbcType="BIT" property="isDeleted" />
<result column="bid_time" jdbcType="VARCHAR" property="bidTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="is_setted" jdbcType="INTEGER" property="isSetted" />
<result column="original_source_url" jdbcType="VARCHAR" property="originalSourceUrl" />
<result column="source" jdbcType="INTEGER" property="source" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.wwdz.ch.db.domain.Item">
<result column="extra" jdbcType="LONGVARCHAR" property="extra" />
<result column="images" jdbcType="LONGVARCHAR" property="images" />
<result column="detail" jdbcType="LONGVARCHAR" property="detail" />
<result column="original_extra" jdbcType="LONGVARCHAR" property="originalExtra" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
`source`
</sql>
<sql id="Blob_Column_List">
extra, images, detail, original_extra
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.ItemExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from item
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.ItemExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from item
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from item
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from item
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.ItemExample">
delete from item
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.Item">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into item (`name`, cid, is_on_sale,
is_std, sort, share_image,
top_image, price, create_time,
source_type, update_time, is_deleted,
bid_time, remark, is_setted,
original_source_url, `source`, extra,
images, detail, original_extra
)
values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT},
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isSetted,jdbcType=INTEGER},
#{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{extra,jdbcType=LONGVARCHAR},
#{images,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.Item">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
`name`,
</if>
<if test="cid != null">
cid,
</if>
<if test="isOnSale != null">
is_on_sale,
</if>
<if test="isStd != null">
is_std,
</if>
<if test="sort != null">
sort,
</if>
<if test="shareImage != null">
share_image,
</if>
<if test="topImage != null">
top_image,
</if>
<if test="price != null">
price,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="sourceType != null">
source_type,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isDeleted != null">
is_deleted,
</if>
<if test="bidTime != null">
bid_time,
</if>
<if test="remark != null">
remark,
</if>
<if test="isSetted != null">
is_setted,
</if>
<if test="originalSourceUrl != null">
original_source_url,
</if>
<if test="source != null">
`source`,
</if>
<if test="extra != null">
extra,
</if>
<if test="images != null">
images,
</if>
<if test="detail != null">
detail,
</if>
<if test="originalExtra != null">
original_extra,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="cid != null">
#{cid,jdbcType=INTEGER},
</if>
<if test="isOnSale != null">
#{isOnSale,jdbcType=BIT},
</if>
<if test="isStd != null">
#{isStd,jdbcType=BIT},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="shareImage != null">
#{shareImage,jdbcType=VARCHAR},
</if>
<if test="topImage != null">
#{topImage,jdbcType=VARCHAR},
</if>
<if test="price != null">
#{price,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="sourceType != null">
#{sourceType,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null">
#{isDeleted,jdbcType=BIT},
</if>
<if test="bidTime != null">
#{bidTime,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="isSetted != null">
#{isSetted,jdbcType=INTEGER},
</if>
<if test="originalSourceUrl != null">
#{originalSourceUrl,jdbcType=VARCHAR},
</if>
<if test="source != null">
#{source,jdbcType=INTEGER},
</if>
<if test="extra != null">
#{extra,jdbcType=LONGVARCHAR},
</if>
<if test="images != null">
#{images,jdbcType=LONGVARCHAR},
</if>
<if test="detail != null">
#{detail,jdbcType=LONGVARCHAR},
</if>
<if test="originalExtra != null">
#{originalExtra,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.ItemExample" resultType="java.lang.Long">
select count(*) from item
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update item
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.cid != null">
cid = #{record.cid,jdbcType=INTEGER},
</if>
<if test="record.isOnSale != null">
is_on_sale = #{record.isOnSale,jdbcType=BIT},
</if>
<if test="record.isStd != null">
is_std = #{record.isStd,jdbcType=BIT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.shareImage != null">
share_image = #{record.shareImage,jdbcType=VARCHAR},
</if>
<if test="record.topImage != null">
top_image = #{record.topImage,jdbcType=VARCHAR},
</if>
<if test="record.price != null">
price = #{record.price,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.sourceType != null">
source_type = #{record.sourceType,jdbcType=INTEGER},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDeleted != null">
is_deleted = #{record.isDeleted,jdbcType=BIT},
</if>
<if test="record.bidTime != null">
bid_time = #{record.bidTime,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.isSetted != null">
is_setted = #{record.isSetted,jdbcType=INTEGER},
</if>
<if test="record.originalSourceUrl != null">
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
</if>
<if test="record.source != null">
`source` = #{record.source,jdbcType=INTEGER},
</if>
<if test="record.extra != null">
extra = #{record.extra,jdbcType=LONGVARCHAR},
</if>
<if test="record.images != null">
images = #{record.images,jdbcType=LONGVARCHAR},
</if>
<if test="record.detail != null">
detail = #{record.detail,jdbcType=LONGVARCHAR},
</if>
<if test="record.originalExtra != null">
original_extra = #{record.originalExtra,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update item
set id = #{record.id,jdbcType=BIGINT},
`name` = #{record.name,jdbcType=VARCHAR},
cid = #{record.cid,jdbcType=INTEGER},
is_on_sale = #{record.isOnSale,jdbcType=BIT},
is_std = #{record.isStd,jdbcType=BIT},
sort = #{record.sort,jdbcType=INTEGER},
share_image = #{record.shareImage,jdbcType=VARCHAR},
top_image = #{record.topImage,jdbcType=VARCHAR},
price = #{record.price,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
source_type = #{record.sourceType,jdbcType=INTEGER},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT},
bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER},
extra = #{record.extra,jdbcType=LONGVARCHAR},
images = #{record.images,jdbcType=LONGVARCHAR},
detail = #{record.detail,jdbcType=LONGVARCHAR},
original_extra = #{record.originalExtra,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update item
set id = #{record.id,jdbcType=BIGINT},
`name` = #{record.name,jdbcType=VARCHAR},
cid = #{record.cid,jdbcType=INTEGER},
is_on_sale = #{record.isOnSale,jdbcType=BIT},
is_std = #{record.isStd,jdbcType=BIT},
sort = #{record.sort,jdbcType=INTEGER},
share_image = #{record.shareImage,jdbcType=VARCHAR},
top_image = #{record.topImage,jdbcType=VARCHAR},
price = #{record.price,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
source_type = #{record.sourceType,jdbcType=INTEGER},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT},
bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.Item">
update item
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="cid != null">
cid = #{cid,jdbcType=INTEGER},
</if>
<if test="isOnSale != null">
is_on_sale = #{isOnSale,jdbcType=BIT},
</if>
<if test="isStd != null">
is_std = #{isStd,jdbcType=BIT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="shareImage != null">
share_image = #{shareImage,jdbcType=VARCHAR},
</if>
<if test="topImage != null">
top_image = #{topImage,jdbcType=VARCHAR},
</if>
<if test="price != null">
price = #{price,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="sourceType != null">
source_type = #{sourceType,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null">
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
<if test="bidTime != null">
bid_time = #{bidTime,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="isSetted != null">
is_setted = #{isSetted,jdbcType=INTEGER},
</if>
<if test="originalSourceUrl != null">
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
</if>
<if test="source != null">
`source` = #{source,jdbcType=INTEGER},
</if>
<if test="extra != null">
extra = #{extra,jdbcType=LONGVARCHAR},
</if>
<if test="images != null">
images = #{images,jdbcType=LONGVARCHAR},
</if>
<if test="detail != null">
detail = #{detail,jdbcType=LONGVARCHAR},
</if>
<if test="originalExtra != null">
original_extra = #{originalExtra,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.wwdz.ch.db.domain.Item">
update item
set `name` = #{name,jdbcType=VARCHAR},
cid = #{cid,jdbcType=INTEGER},
is_on_sale = #{isOnSale,jdbcType=BIT},
is_std = #{isStd,jdbcType=BIT},
sort = #{sort,jdbcType=INTEGER},
share_image = #{shareImage,jdbcType=VARCHAR},
top_image = #{topImage,jdbcType=VARCHAR},
price = #{price,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT},
bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER},
extra = #{extra,jdbcType=LONGVARCHAR},
images = #{images,jdbcType=LONGVARCHAR},
detail = #{detail,jdbcType=LONGVARCHAR},
original_extra = #{originalExtra,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.Item">
update item
set `name` = #{name,jdbcType=VARCHAR},
cid = #{cid,jdbcType=INTEGER},
is_on_sale = #{isOnSale,jdbcType=BIT},
is_std = #{isStd,jdbcType=BIT},
sort = #{sort,jdbcType=INTEGER},
share_image = #{shareImage,jdbcType=VARCHAR},
top_image = #{topImage,jdbcType=VARCHAR},
price = #{price,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT},
bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>
\ No newline at end of file
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