dev-discount
袁野 6 years ago
parent 2a72da3dc0
commit fa9f0f3fc0
  1. 16
      hai-service/src/main/java/com/hai/dao/BsProductConfigMapper.java
  2. 28
      hai-service/src/main/java/com/hai/dao/BsProductConfigSqlProvider.java
  3. 32
      hai-service/src/main/java/com/hai/entity/BsProductConfig.java
  4. 130
      hai-service/src/main/java/com/hai/entity/BsProductConfigExample.java

@ -39,12 +39,14 @@ public interface BsProductConfigMapper extends BsProductConfigMapperExt {
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_product_config (product_id, company_id, ",
"insert into bs_product_config (product_id, product_name, ",
"product_type, company_id, ",
"discount, operator_id, ",
"operator_name, create_time, ",
"update_time, `status`, ",
"ext_1, ext_2, ext_3)",
"values (#{productId,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, ",
"values (#{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, ",
"#{productType,jdbcType=INTEGER}, #{companyId,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 BsProductConfigMapper extends BsProductConfigMapperExt {
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT),
@Result(column="product_name", property="productName", jdbcType=JdbcType.VARCHAR),
@Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER),
@Result(column="company_id", property="companyId", 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 BsProductConfigMapper extends BsProductConfigMapperExt {
@Select({
"select",
"id, product_id, company_id, discount, operator_id, operator_name, create_time, ",
"update_time, `status`, ext_1, ext_2, ext_3",
"id, product_id, product_name, product_type, company_id, discount, operator_id, ",
"operator_name, create_time, update_time, `status`, ext_1, ext_2, ext_3",
"from bs_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_name", property="productName", jdbcType=JdbcType.VARCHAR),
@Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER),
@Result(column="company_id", property="companyId", 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 BsProductConfigMapper extends BsProductConfigMapperExt {
@Update({
"update bs_product_config",
"set product_id = #{productId,jdbcType=BIGINT},",
"product_name = #{productName,jdbcType=VARCHAR},",
"product_type = #{productType,jdbcType=INTEGER},",
"company_id = #{companyId,jdbcType=BIGINT},",
"discount = #{discount,jdbcType=DECIMAL},",
"operator_id = #{operatorId,jdbcType=BIGINT},",

@ -32,6 +32,14 @@ public class BsProductConfigSqlProvider {
sql.VALUES("product_id", "#{productId,jdbcType=BIGINT}");
}
if (record.getProductName() != null) {
sql.VALUES("product_name", "#{productName,jdbcType=VARCHAR}");
}
if (record.getProductType() != null) {
sql.VALUES("product_type", "#{productType,jdbcType=INTEGER}");
}
if (record.getCompanyId() != null) {
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}");
}
@ -83,6 +91,8 @@ public class BsProductConfigSqlProvider {
sql.SELECT("id");
}
sql.SELECT("product_id");
sql.SELECT("product_name");
sql.SELECT("product_type");
sql.SELECT("company_id");
sql.SELECT("discount");
sql.SELECT("operator_id");
@ -118,6 +128,14 @@ public class BsProductConfigSqlProvider {
sql.SET("product_id = #{record.productId,jdbcType=BIGINT}");
}
if (record.getProductName() != null) {
sql.SET("product_name = #{record.productName,jdbcType=VARCHAR}");
}
if (record.getProductType() != null) {
sql.SET("product_type = #{record.productType,jdbcType=INTEGER}");
}
if (record.getCompanyId() != null) {
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
}
@ -168,6 +186,8 @@ public class BsProductConfigSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("product_id = #{record.productId,jdbcType=BIGINT}");
sql.SET("product_name = #{record.productName,jdbcType=VARCHAR}");
sql.SET("product_type = #{record.productType,jdbcType=INTEGER}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
sql.SET("discount = #{record.discount,jdbcType=DECIMAL}");
sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}");
@ -192,6 +212,14 @@ public class BsProductConfigSqlProvider {
sql.SET("product_id = #{productId,jdbcType=BIGINT}");
}
if (record.getProductName() != null) {
sql.SET("product_name = #{productName,jdbcType=VARCHAR}");
}
if (record.getProductType() != null) {
sql.SET("product_type = #{productType,jdbcType=INTEGER}");
}
if (record.getCompanyId() != null) {
sql.SET("company_id = #{companyId,jdbcType=BIGINT}");
}

@ -24,6 +24,16 @@ public class BsProductConfig implements Serializable {
*/
private Long productId;
/**
* 产品名称
*/
private String productName;
/**
* 产品类型 1:星巴克 2肯德基
*/
private Integer productType;
/**
* 公司id
*/
@ -92,6 +102,22 @@ public class BsProductConfig implements Serializable {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public Integer getProductType() {
return productType;
}
public void setProductType(Integer productType) {
this.productType = productType;
}
public Long getCompanyId() {
return companyId;
}
@ -186,6 +212,8 @@ public class BsProductConfig implements Serializable {
BsProductConfig other = (BsProductConfig) 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.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
&& (this.getProductType() == null ? other.getProductType() == null : this.getProductType().equals(other.getProductType()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (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 BsProductConfig implements Serializable {
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
result = prime * result + ((getProductType() == null) ? 0 : getProductType().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getDiscount() == null) ? 0 : getDiscount().hashCode());
result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
@ -225,6 +255,8 @@ public class BsProductConfig implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", productId=").append(productId);
sb.append(", productName=").append(productName);
sb.append(", productType=").append(productType);
sb.append(", companyId=").append(companyId);
sb.append(", discount=").append(discount);
sb.append(", operatorId=").append(operatorId);

@ -246,6 +246,136 @@ public class BsProductConfigExample {
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<String> values) {
addCriterion("product_name in", values, "productName");
return (Criteria) this;
}
public Criteria andProductNameNotIn(List<String> 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 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<Integer> values) {
addCriterion("product_type in", values, "productType");
return (Criteria) this;
}
public Criteria andProductTypeNotIn(List<Integer> 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 andCompanyIdIsNull() {
addCriterion("company_id is null");
return (Criteria) this;

Loading…
Cancel
Save