diff --git a/hai-service/src/main/java/com/hai/dao/ApiProductConfigMapper.java b/hai-service/src/main/java/com/hai/dao/ApiProductConfigMapper.java index 41f3006a..e169d3b7 100644 --- a/hai-service/src/main/java/com/hai/dao/ApiProductConfigMapper.java +++ b/hai-service/src/main/java/com/hai/dao/ApiProductConfigMapper.java @@ -39,12 +39,14 @@ public interface ApiProductConfigMapper extends ApiProductConfigMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into api_product_config (product_id, merchants_id, ", + "insert into api_product_config (product_id, product_type, ", + "product_name, merchants_id, ", "discount, operator_id, ", "operator_name, create_time, ", "update_time, `status`, ", "ext_1, ext_2, ext_3)", - "values (#{productId,jdbcType=BIGINT}, #{merchantsId,jdbcType=BIGINT}, ", + "values (#{productId,jdbcType=BIGINT}, #{productType,jdbcType=INTEGER}, ", + "#{productName,jdbcType=VARCHAR}, #{merchantsId,jdbcType=BIGINT}, ", "#{discount,jdbcType=DECIMAL}, #{operatorId,jdbcType=BIGINT}, ", "#{operatorName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", "#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", @@ -61,6 +63,8 @@ public interface ApiProductConfigMapper extends ApiProductConfigMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT), + @Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER), + @Result(column="product_name", property="productName", jdbcType=JdbcType.VARCHAR), @Result(column="merchants_id", property="merchantsId", jdbcType=JdbcType.BIGINT), @Result(column="discount", property="discount", jdbcType=JdbcType.DECIMAL), @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), @@ -76,14 +80,16 @@ public interface ApiProductConfigMapper extends ApiProductConfigMapperExt { @Select({ "select", - "id, product_id, merchants_id, discount, operator_id, operator_name, create_time, ", - "update_time, `status`, ext_1, ext_2, ext_3", + "id, product_id, product_type, product_name, merchants_id, discount, operator_id, ", + "operator_name, create_time, update_time, `status`, ext_1, ext_2, ext_3", "from api_product_config", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT), + @Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER), + @Result(column="product_name", property="productName", jdbcType=JdbcType.VARCHAR), @Result(column="merchants_id", property="merchantsId", jdbcType=JdbcType.BIGINT), @Result(column="discount", property="discount", jdbcType=JdbcType.DECIMAL), @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), @@ -109,6 +115,8 @@ public interface ApiProductConfigMapper extends ApiProductConfigMapperExt { @Update({ "update api_product_config", "set product_id = #{productId,jdbcType=BIGINT},", + "product_type = #{productType,jdbcType=INTEGER},", + "product_name = #{productName,jdbcType=VARCHAR},", "merchants_id = #{merchantsId,jdbcType=BIGINT},", "discount = #{discount,jdbcType=DECIMAL},", "operator_id = #{operatorId,jdbcType=BIGINT},", diff --git a/hai-service/src/main/java/com/hai/dao/ApiProductConfigSqlProvider.java b/hai-service/src/main/java/com/hai/dao/ApiProductConfigSqlProvider.java index 32742d50..cbd927d0 100644 --- a/hai-service/src/main/java/com/hai/dao/ApiProductConfigSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/ApiProductConfigSqlProvider.java @@ -32,6 +32,14 @@ public class ApiProductConfigSqlProvider { sql.VALUES("product_id", "#{productId,jdbcType=BIGINT}"); } + if (record.getProductType() != null) { + sql.VALUES("product_type", "#{productType,jdbcType=INTEGER}"); + } + + if (record.getProductName() != null) { + sql.VALUES("product_name", "#{productName,jdbcType=VARCHAR}"); + } + if (record.getMerchantsId() != null) { sql.VALUES("merchants_id", "#{merchantsId,jdbcType=BIGINT}"); } @@ -83,6 +91,8 @@ public class ApiProductConfigSqlProvider { sql.SELECT("id"); } sql.SELECT("product_id"); + sql.SELECT("product_type"); + sql.SELECT("product_name"); sql.SELECT("merchants_id"); sql.SELECT("discount"); sql.SELECT("operator_id"); @@ -118,6 +128,14 @@ public class ApiProductConfigSqlProvider { sql.SET("product_id = #{record.productId,jdbcType=BIGINT}"); } + if (record.getProductType() != null) { + sql.SET("product_type = #{record.productType,jdbcType=INTEGER}"); + } + + if (record.getProductName() != null) { + sql.SET("product_name = #{record.productName,jdbcType=VARCHAR}"); + } + if (record.getMerchantsId() != null) { sql.SET("merchants_id = #{record.merchantsId,jdbcType=BIGINT}"); } @@ -168,6 +186,8 @@ public class ApiProductConfigSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("product_id = #{record.productId,jdbcType=BIGINT}"); + sql.SET("product_type = #{record.productType,jdbcType=INTEGER}"); + sql.SET("product_name = #{record.productName,jdbcType=VARCHAR}"); sql.SET("merchants_id = #{record.merchantsId,jdbcType=BIGINT}"); sql.SET("discount = #{record.discount,jdbcType=DECIMAL}"); sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); @@ -192,6 +212,14 @@ public class ApiProductConfigSqlProvider { sql.SET("product_id = #{productId,jdbcType=BIGINT}"); } + if (record.getProductType() != null) { + sql.SET("product_type = #{productType,jdbcType=INTEGER}"); + } + + if (record.getProductName() != null) { + sql.SET("product_name = #{productName,jdbcType=VARCHAR}"); + } + if (record.getMerchantsId() != null) { sql.SET("merchants_id = #{merchantsId,jdbcType=BIGINT}"); } diff --git a/hai-service/src/main/java/com/hai/entity/ApiProductConfig.java b/hai-service/src/main/java/com/hai/entity/ApiProductConfig.java index 7be2e261..2be1de3f 100644 --- a/hai-service/src/main/java/com/hai/entity/ApiProductConfig.java +++ b/hai-service/src/main/java/com/hai/entity/ApiProductConfig.java @@ -24,6 +24,16 @@ public class ApiProductConfig implements Serializable { */ private Long productId; + /** + * 产品类型 1:话费 + */ + private Integer productType; + + /** + * 产品名称 + */ + private String productName; + /** * 商户id */ @@ -92,6 +102,22 @@ public class ApiProductConfig implements Serializable { this.productId = productId; } + public Integer getProductType() { + return productType; + } + + public void setProductType(Integer productType) { + this.productType = productType; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + public Long getMerchantsId() { return merchantsId; } @@ -186,6 +212,8 @@ public class ApiProductConfig implements Serializable { ApiProductConfig other = (ApiProductConfig) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId())) + && (this.getProductType() == null ? other.getProductType() == null : this.getProductType().equals(other.getProductType())) + && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName())) && (this.getMerchantsId() == null ? other.getMerchantsId() == null : this.getMerchantsId().equals(other.getMerchantsId())) && (this.getDiscount() == null ? other.getDiscount() == null : this.getDiscount().equals(other.getDiscount())) && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId())) @@ -204,6 +232,8 @@ public class ApiProductConfig implements Serializable { int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode()); + result = prime * result + ((getProductType() == null) ? 0 : getProductType().hashCode()); + result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode()); result = prime * result + ((getMerchantsId() == null) ? 0 : getMerchantsId().hashCode()); result = prime * result + ((getDiscount() == null) ? 0 : getDiscount().hashCode()); result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode()); @@ -225,6 +255,8 @@ public class ApiProductConfig implements Serializable { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", productId=").append(productId); + sb.append(", productType=").append(productType); + sb.append(", productName=").append(productName); sb.append(", merchantsId=").append(merchantsId); sb.append(", discount=").append(discount); sb.append(", operatorId=").append(operatorId); diff --git a/hai-service/src/main/java/com/hai/entity/ApiProductConfigExample.java b/hai-service/src/main/java/com/hai/entity/ApiProductConfigExample.java index dbecda14..fe98a6e4 100644 --- a/hai-service/src/main/java/com/hai/entity/ApiProductConfigExample.java +++ b/hai-service/src/main/java/com/hai/entity/ApiProductConfigExample.java @@ -246,6 +246,136 @@ public class ApiProductConfigExample { return (Criteria) this; } + public Criteria andProductTypeIsNull() { + addCriterion("product_type is null"); + return (Criteria) this; + } + + public Criteria andProductTypeIsNotNull() { + addCriterion("product_type is not null"); + return (Criteria) this; + } + + public Criteria andProductTypeEqualTo(Integer value) { + addCriterion("product_type =", value, "productType"); + return (Criteria) this; + } + + public Criteria andProductTypeNotEqualTo(Integer value) { + addCriterion("product_type <>", value, "productType"); + return (Criteria) this; + } + + public Criteria andProductTypeGreaterThan(Integer value) { + addCriterion("product_type >", value, "productType"); + return (Criteria) this; + } + + public Criteria andProductTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("product_type >=", value, "productType"); + return (Criteria) this; + } + + public Criteria andProductTypeLessThan(Integer value) { + addCriterion("product_type <", value, "productType"); + return (Criteria) this; + } + + public Criteria andProductTypeLessThanOrEqualTo(Integer value) { + addCriterion("product_type <=", value, "productType"); + return (Criteria) this; + } + + public Criteria andProductTypeIn(List values) { + addCriterion("product_type in", values, "productType"); + return (Criteria) this; + } + + public Criteria andProductTypeNotIn(List values) { + addCriterion("product_type not in", values, "productType"); + return (Criteria) this; + } + + public Criteria andProductTypeBetween(Integer value1, Integer value2) { + addCriterion("product_type between", value1, value2, "productType"); + return (Criteria) this; + } + + public Criteria andProductTypeNotBetween(Integer value1, Integer value2) { + addCriterion("product_type not between", value1, value2, "productType"); + return (Criteria) this; + } + + public Criteria andProductNameIsNull() { + addCriterion("product_name is null"); + return (Criteria) this; + } + + public Criteria andProductNameIsNotNull() { + addCriterion("product_name is not null"); + return (Criteria) this; + } + + public Criteria andProductNameEqualTo(String value) { + addCriterion("product_name =", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotEqualTo(String value) { + addCriterion("product_name <>", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameGreaterThan(String value) { + addCriterion("product_name >", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameGreaterThanOrEqualTo(String value) { + addCriterion("product_name >=", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLessThan(String value) { + addCriterion("product_name <", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLessThanOrEqualTo(String value) { + addCriterion("product_name <=", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLike(String value) { + addCriterion("product_name like", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotLike(String value) { + addCriterion("product_name not like", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameIn(List values) { + addCriterion("product_name in", values, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotIn(List values) { + addCriterion("product_name not in", values, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameBetween(String value1, String value2) { + addCriterion("product_name between", value1, value2, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotBetween(String value1, String value2) { + addCriterion("product_name not between", value1, value2, "productName"); + return (Criteria) this; + } + public Criteria andMerchantsIdIsNull() { addCriterion("merchants_id is null"); return (Criteria) this;