diff --git a/hai-service/src/main/java/com/hai/dao/GoodsDetailMapper.java b/hai-service/src/main/java/com/hai/dao/GoodsDetailMapper.java index 674e3696..7f676036 100644 --- a/hai-service/src/main/java/com/hai/dao/GoodsDetailMapper.java +++ b/hai-service/src/main/java/com/hai/dao/GoodsDetailMapper.java @@ -39,22 +39,22 @@ public interface GoodsDetailMapper extends GoodsDetailMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into goods_detail (company_id, goods_type, ", - "`name`, list_describe, ", - "goods_describe, list_img, ", - "banner_img, detail_img, ", - "`status`, create_time, ", - "update_time, op_id, ", - "op_name, ext_1, ext_2, ", - "ext_3)", - "values (#{companyId,jdbcType=BIGINT}, #{goodsType,jdbcType=BIGINT}, ", - "#{name,jdbcType=VARCHAR}, #{listDescribe,jdbcType=VARCHAR}, ", - "#{goodsDescribe,jdbcType=VARCHAR}, #{listImg,jdbcType=VARCHAR}, ", - "#{bannerImg,jdbcType=VARCHAR}, #{detailImg,jdbcType=VARCHAR}, ", - "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", - "#{updateTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", - "#{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", - "#{ext3,jdbcType=VARCHAR})" + "insert into goods_detail (company_id, goods_type_name, ", + "goods_type, `name`, ", + "list_describe, goods_describe, ", + "list_img, banner_img, ", + "detail_img, `status`, ", + "create_time, update_time, ", + "op_id, op_name, ext_1, ", + "ext_2, ext_3)", + "values (#{companyId,jdbcType=BIGINT}, #{goodsTypeName,jdbcType=VARCHAR}, ", + "#{goodsType,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ", + "#{listDescribe,jdbcType=VARCHAR}, #{goodsDescribe,jdbcType=VARCHAR}, ", + "#{listImg,jdbcType=VARCHAR}, #{bannerImg,jdbcType=VARCHAR}, ", + "#{detailImg,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(GoodsDetail record); @@ -67,6 +67,7 @@ public interface GoodsDetailMapper extends GoodsDetailMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR), @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="list_describe", property="listDescribe", jdbcType=JdbcType.VARCHAR), @@ -87,15 +88,16 @@ public interface GoodsDetailMapper extends GoodsDetailMapperExt { @Select({ "select", - "id, company_id, goods_type, `name`, list_describe, goods_describe, list_img, ", - "banner_img, detail_img, `status`, create_time, update_time, op_id, op_name, ", - "ext_1, ext_2, ext_3", + "id, company_id, goods_type_name, goods_type, `name`, list_describe, goods_describe, ", + "list_img, banner_img, detail_img, `status`, create_time, update_time, op_id, ", + "op_name, ext_1, ext_2, ext_3", "from goods_detail", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR), @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="list_describe", property="listDescribe", jdbcType=JdbcType.VARCHAR), @@ -126,6 +128,7 @@ public interface GoodsDetailMapper extends GoodsDetailMapperExt { @Update({ "update goods_detail", "set company_id = #{companyId,jdbcType=BIGINT},", + "goods_type_name = #{goodsTypeName,jdbcType=VARCHAR},", "goods_type = #{goodsType,jdbcType=BIGINT},", "`name` = #{name,jdbcType=VARCHAR},", "list_describe = #{listDescribe,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/GoodsDetailSqlProvider.java b/hai-service/src/main/java/com/hai/dao/GoodsDetailSqlProvider.java index dddad9db..a2377d30 100644 --- a/hai-service/src/main/java/com/hai/dao/GoodsDetailSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/GoodsDetailSqlProvider.java @@ -32,6 +32,10 @@ public class GoodsDetailSqlProvider { sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); } + if (record.getGoodsTypeName() != null) { + sql.VALUES("goods_type_name", "#{goodsTypeName,jdbcType=VARCHAR}"); + } + if (record.getGoodsType() != null) { sql.VALUES("goods_type", "#{goodsType,jdbcType=BIGINT}"); } @@ -103,6 +107,7 @@ public class GoodsDetailSqlProvider { sql.SELECT("id"); } sql.SELECT("company_id"); + sql.SELECT("goods_type_name"); sql.SELECT("goods_type"); sql.SELECT("`name`"); sql.SELECT("list_describe"); @@ -143,6 +148,10 @@ public class GoodsDetailSqlProvider { sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); } + if (record.getGoodsTypeName() != null) { + sql.SET("goods_type_name = #{record.goodsTypeName,jdbcType=VARCHAR}"); + } + if (record.getGoodsType() != null) { sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}"); } @@ -213,6 +222,7 @@ public class GoodsDetailSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + sql.SET("goods_type_name = #{record.goodsTypeName,jdbcType=VARCHAR}"); sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}"); sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); sql.SET("list_describe = #{record.listDescribe,jdbcType=VARCHAR}"); @@ -242,6 +252,10 @@ public class GoodsDetailSqlProvider { sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); } + if (record.getGoodsTypeName() != null) { + sql.SET("goods_type_name = #{goodsTypeName,jdbcType=VARCHAR}"); + } + if (record.getGoodsType() != null) { sql.SET("goods_type = #{goodsType,jdbcType=BIGINT}"); } diff --git a/hai-service/src/main/java/com/hai/entity/GoodsDetail.java b/hai-service/src/main/java/com/hai/entity/GoodsDetail.java index 5c6dba4c..3d67fe76 100644 --- a/hai-service/src/main/java/com/hai/entity/GoodsDetail.java +++ b/hai-service/src/main/java/com/hai/entity/GoodsDetail.java @@ -23,6 +23,11 @@ public class GoodsDetail implements Serializable { */ private Long companyId; + /** + * 商品类型名称 + */ + private String goodsTypeName; + /** * 商品类型 */ @@ -116,6 +121,14 @@ public class GoodsDetail implements Serializable { this.companyId = companyId; } + public String getGoodsTypeName() { + return goodsTypeName; + } + + public void setGoodsTypeName(String goodsTypeName) { + this.goodsTypeName = goodsTypeName; + } + public Long getGoodsType() { return goodsType; } @@ -250,6 +263,7 @@ public class GoodsDetail implements Serializable { GoodsDetail other = (GoodsDetail) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) + && (this.getGoodsTypeName() == null ? other.getGoodsTypeName() == null : this.getGoodsTypeName().equals(other.getGoodsTypeName())) && (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) && (this.getListDescribe() == null ? other.getListDescribe() == null : this.getListDescribe().equals(other.getListDescribe())) @@ -273,6 +287,7 @@ public class GoodsDetail implements Serializable { int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); + result = prime * result + ((getGoodsTypeName() == null) ? 0 : getGoodsTypeName().hashCode()); result = prime * result + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode()); result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); result = prime * result + ((getListDescribe() == null) ? 0 : getListDescribe().hashCode()); @@ -299,6 +314,7 @@ public class GoodsDetail implements Serializable { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", companyId=").append(companyId); + sb.append(", goodsTypeName=").append(goodsTypeName); sb.append(", goodsType=").append(goodsType); sb.append(", name=").append(name); sb.append(", listDescribe=").append(listDescribe); diff --git a/hai-service/src/main/java/com/hai/entity/GoodsDetailExample.java b/hai-service/src/main/java/com/hai/entity/GoodsDetailExample.java index 219926b9..2034957e 100644 --- a/hai-service/src/main/java/com/hai/entity/GoodsDetailExample.java +++ b/hai-service/src/main/java/com/hai/entity/GoodsDetailExample.java @@ -245,6 +245,76 @@ public class GoodsDetailExample { return (Criteria) this; } + public Criteria andGoodsTypeNameIsNull() { + addCriterion("goods_type_name is null"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameIsNotNull() { + addCriterion("goods_type_name is not null"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameEqualTo(String value) { + addCriterion("goods_type_name =", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameNotEqualTo(String value) { + addCriterion("goods_type_name <>", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameGreaterThan(String value) { + addCriterion("goods_type_name >", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameGreaterThanOrEqualTo(String value) { + addCriterion("goods_type_name >=", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameLessThan(String value) { + addCriterion("goods_type_name <", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameLessThanOrEqualTo(String value) { + addCriterion("goods_type_name <=", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameLike(String value) { + addCriterion("goods_type_name like", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameNotLike(String value) { + addCriterion("goods_type_name not like", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameIn(List values) { + addCriterion("goods_type_name in", values, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameNotIn(List values) { + addCriterion("goods_type_name not in", values, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameBetween(String value1, String value2) { + addCriterion("goods_type_name between", value1, value2, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameNotBetween(String value1, String value2) { + addCriterion("goods_type_name not between", value1, value2, "goodsTypeName"); + return (Criteria) this; + } + public Criteria andGoodsTypeIsNull() { addCriterion("goods_type is null"); return (Criteria) this;