diff --git a/service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java b/service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java index 6708226..68a0f46 100644 --- a/service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java +++ b/service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java @@ -42,25 +42,27 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt { "insert into goods_msg (goods_type, third_id, ", "goods_type_name, goods_type_parent, ", "goods_type_parent_name, sale_num, ", - "`type`, goods_brand_name, ", - "goods_brand, goods_label, ", - "goods_explain, title, ", - "list_img, banner_img, ", - "detail_img, `status`, ", - "create_time, update_time, ", - "mer_id, mer_name, ext_1, ", - "ext_2, ext_3)", + "`type`, child_type, ", + "goods_brand_name, goods_brand, ", + "goods_label, goods_explain, ", + "title, list_img, ", + "banner_img, detail_img, ", + "`status`, create_time, ", + "update_time, mer_id, ", + "mer_name, ext_1, ext_2, ", + "ext_3)", "values (#{goodsType,jdbcType=BIGINT}, #{thirdId,jdbcType=VARCHAR}, ", "#{goodsTypeName,jdbcType=VARCHAR}, #{goodsTypeParent,jdbcType=BIGINT}, ", "#{goodsTypeParentName,jdbcType=VARCHAR}, #{saleNum,jdbcType=INTEGER}, ", - "#{type,jdbcType=INTEGER}, #{goodsBrandName,jdbcType=VARCHAR}, ", - "#{goodsBrand,jdbcType=BIGINT}, #{goodsLabel,jdbcType=VARCHAR}, ", - "#{goodsExplain,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, ", - "#{listImg,jdbcType=VARCHAR}, #{bannerImg,jdbcType=VARCHAR}, ", - "#{detailImg,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", - "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", - "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", - "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{type,jdbcType=INTEGER}, #{childType,jdbcType=INTEGER}, ", + "#{goodsBrandName,jdbcType=VARCHAR}, #{goodsBrand,jdbcType=BIGINT}, ", + "#{goodsLabel,jdbcType=VARCHAR}, #{goodsExplain,jdbcType=VARCHAR}, ", + "#{title,jdbcType=VARCHAR}, #{listImg,jdbcType=VARCHAR}, ", + "#{bannerImg,jdbcType=VARCHAR}, #{detailImg,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{merId,jdbcType=BIGINT}, ", + "#{merName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", + "#{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(GoodsMsg record); @@ -79,6 +81,7 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt { @Result(column="goods_type_parent_name", property="goodsTypeParentName", jdbcType=JdbcType.VARCHAR), @Result(column="sale_num", property="saleNum", jdbcType=JdbcType.INTEGER), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="child_type", property="childType", jdbcType=JdbcType.INTEGER), @Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR), @Result(column="goods_brand", property="goodsBrand", jdbcType=JdbcType.BIGINT), @Result(column="goods_label", property="goodsLabel", jdbcType=JdbcType.VARCHAR), @@ -101,7 +104,7 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt { @Select({ "select", "id, goods_type, third_id, goods_type_name, goods_type_parent, goods_type_parent_name, ", - "sale_num, `type`, goods_brand_name, goods_brand, goods_label, goods_explain, ", + "sale_num, `type`, child_type, goods_brand_name, goods_brand, goods_label, goods_explain, ", "title, list_img, banner_img, detail_img, `status`, create_time, update_time, ", "mer_id, mer_name, ext_1, ext_2, ext_3", "from goods_msg", @@ -116,6 +119,7 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt { @Result(column="goods_type_parent_name", property="goodsTypeParentName", jdbcType=JdbcType.VARCHAR), @Result(column="sale_num", property="saleNum", jdbcType=JdbcType.INTEGER), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="child_type", property="childType", jdbcType=JdbcType.INTEGER), @Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR), @Result(column="goods_brand", property="goodsBrand", jdbcType=JdbcType.BIGINT), @Result(column="goods_label", property="goodsLabel", jdbcType=JdbcType.VARCHAR), @@ -153,6 +157,7 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt { "goods_type_parent_name = #{goodsTypeParentName,jdbcType=VARCHAR},", "sale_num = #{saleNum,jdbcType=INTEGER},", "`type` = #{type,jdbcType=INTEGER},", + "child_type = #{childType,jdbcType=INTEGER},", "goods_brand_name = #{goodsBrandName,jdbcType=VARCHAR},", "goods_brand = #{goodsBrand,jdbcType=BIGINT},", "goods_label = #{goodsLabel,jdbcType=VARCHAR},", diff --git a/service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java b/service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java index afd4de7..67310d2 100644 --- a/service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java @@ -56,6 +56,10 @@ public class GoodsMsgSqlProvider { sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); } + if (record.getChildType() != null) { + sql.VALUES("child_type", "#{childType,jdbcType=INTEGER}"); + } + if (record.getGoodsBrandName() != null) { sql.VALUES("goods_brand_name", "#{goodsBrandName,jdbcType=VARCHAR}"); } @@ -137,6 +141,7 @@ public class GoodsMsgSqlProvider { sql.SELECT("goods_type_parent_name"); sql.SELECT("sale_num"); sql.SELECT("`type`"); + sql.SELECT("child_type"); sql.SELECT("goods_brand_name"); sql.SELECT("goods_brand"); sql.SELECT("goods_label"); @@ -202,6 +207,10 @@ public class GoodsMsgSqlProvider { sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); } + if (record.getChildType() != null) { + sql.SET("child_type = #{record.childType,jdbcType=INTEGER}"); + } + if (record.getGoodsBrandName() != null) { sql.SET("goods_brand_name = #{record.goodsBrandName,jdbcType=VARCHAR}"); } @@ -282,6 +291,7 @@ public class GoodsMsgSqlProvider { sql.SET("goods_type_parent_name = #{record.goodsTypeParentName,jdbcType=VARCHAR}"); sql.SET("sale_num = #{record.saleNum,jdbcType=INTEGER}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + sql.SET("child_type = #{record.childType,jdbcType=INTEGER}"); sql.SET("goods_brand_name = #{record.goodsBrandName,jdbcType=VARCHAR}"); sql.SET("goods_brand = #{record.goodsBrand,jdbcType=BIGINT}"); sql.SET("goods_label = #{record.goodsLabel,jdbcType=VARCHAR}"); @@ -336,6 +346,10 @@ public class GoodsMsgSqlProvider { sql.SET("`type` = #{type,jdbcType=INTEGER}"); } + if (record.getChildType() != null) { + sql.SET("child_type = #{childType,jdbcType=INTEGER}"); + } + if (record.getGoodsBrandName() != null) { sql.SET("goods_brand_name = #{goodsBrandName,jdbcType=VARCHAR}"); } diff --git a/service/src/main/java/com/hfkj/entity/GoodsMsg.java b/service/src/main/java/com/hfkj/entity/GoodsMsg.java index a913861..109175c 100644 --- a/service/src/main/java/com/hfkj/entity/GoodsMsg.java +++ b/service/src/main/java/com/hfkj/entity/GoodsMsg.java @@ -53,6 +53,11 @@ public class GoodsMsg implements Serializable { */ private Integer type; + /** + * 类型:1.京东产品 + */ + private Integer childType; + /** * 商品品牌名称 */ @@ -199,6 +204,14 @@ public class GoodsMsg implements Serializable { this.type = type; } + public Integer getChildType() { + return childType; + } + + public void setChildType(Integer childType) { + this.childType = childType; + } + public String getGoodsBrandName() { return goodsBrandName; } @@ -347,6 +360,7 @@ public class GoodsMsg implements Serializable { && (this.getGoodsTypeParentName() == null ? other.getGoodsTypeParentName() == null : this.getGoodsTypeParentName().equals(other.getGoodsTypeParentName())) && (this.getSaleNum() == null ? other.getSaleNum() == null : this.getSaleNum().equals(other.getSaleNum())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getChildType() == null ? other.getChildType() == null : this.getChildType().equals(other.getChildType())) && (this.getGoodsBrandName() == null ? other.getGoodsBrandName() == null : this.getGoodsBrandName().equals(other.getGoodsBrandName())) && (this.getGoodsBrand() == null ? other.getGoodsBrand() == null : this.getGoodsBrand().equals(other.getGoodsBrand())) && (this.getGoodsLabel() == null ? other.getGoodsLabel() == null : this.getGoodsLabel().equals(other.getGoodsLabel())) @@ -377,6 +391,7 @@ public class GoodsMsg implements Serializable { result = prime * result + ((getGoodsTypeParentName() == null) ? 0 : getGoodsTypeParentName().hashCode()); result = prime * result + ((getSaleNum() == null) ? 0 : getSaleNum().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getChildType() == null) ? 0 : getChildType().hashCode()); result = prime * result + ((getGoodsBrandName() == null) ? 0 : getGoodsBrandName().hashCode()); result = prime * result + ((getGoodsBrand() == null) ? 0 : getGoodsBrand().hashCode()); result = prime * result + ((getGoodsLabel() == null) ? 0 : getGoodsLabel().hashCode()); @@ -410,6 +425,7 @@ public class GoodsMsg implements Serializable { sb.append(", goodsTypeParentName=").append(goodsTypeParentName); sb.append(", saleNum=").append(saleNum); sb.append(", type=").append(type); + sb.append(", childType=").append(childType); sb.append(", goodsBrandName=").append(goodsBrandName); sb.append(", goodsBrand=").append(goodsBrand); sb.append(", goodsLabel=").append(goodsLabel); diff --git a/service/src/main/java/com/hfkj/entity/GoodsMsgExample.java b/service/src/main/java/com/hfkj/entity/GoodsMsgExample.java index 2ee26b0..8795d18 100644 --- a/service/src/main/java/com/hfkj/entity/GoodsMsgExample.java +++ b/service/src/main/java/com/hfkj/entity/GoodsMsgExample.java @@ -635,6 +635,66 @@ public class GoodsMsgExample { return (Criteria) this; } + public Criteria andChildTypeIsNull() { + addCriterion("child_type is null"); + return (Criteria) this; + } + + public Criteria andChildTypeIsNotNull() { + addCriterion("child_type is not null"); + return (Criteria) this; + } + + public Criteria andChildTypeEqualTo(Integer value) { + addCriterion("child_type =", value, "childType"); + return (Criteria) this; + } + + public Criteria andChildTypeNotEqualTo(Integer value) { + addCriterion("child_type <>", value, "childType"); + return (Criteria) this; + } + + public Criteria andChildTypeGreaterThan(Integer value) { + addCriterion("child_type >", value, "childType"); + return (Criteria) this; + } + + public Criteria andChildTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("child_type >=", value, "childType"); + return (Criteria) this; + } + + public Criteria andChildTypeLessThan(Integer value) { + addCriterion("child_type <", value, "childType"); + return (Criteria) this; + } + + public Criteria andChildTypeLessThanOrEqualTo(Integer value) { + addCriterion("child_type <=", value, "childType"); + return (Criteria) this; + } + + public Criteria andChildTypeIn(List values) { + addCriterion("child_type in", values, "childType"); + return (Criteria) this; + } + + public Criteria andChildTypeNotIn(List values) { + addCriterion("child_type not in", values, "childType"); + return (Criteria) this; + } + + public Criteria andChildTypeBetween(Integer value1, Integer value2) { + addCriterion("child_type between", value1, value2, "childType"); + return (Criteria) this; + } + + public Criteria andChildTypeNotBetween(Integer value1, Integer value2) { + addCriterion("child_type not between", value1, value2, "childType"); + return (Criteria) this; + } + public Criteria andGoodsBrandNameIsNull() { addCriterion("goods_brand_name is null"); return (Criteria) this;