袁野 2 years ago
parent f3ffcf32be
commit 8310ec1af5
  1. 25
      hai-service/src/main/java/com/hai/dao/ApiProductConfigMapper.java
  2. 14
      hai-service/src/main/java/com/hai/dao/ApiProductConfigSqlProvider.java
  3. 16
      hai-service/src/main/java/com/hai/entity/ApiProductConfig.java
  4. 60
      hai-service/src/main/java/com/hai/entity/ApiProductConfigExample.java

@ -40,15 +40,17 @@ public interface ApiProductConfigMapper extends ApiProductConfigMapperExt {
@Insert({ @Insert({
"insert into api_product_config (product_id, merchants_id, ", "insert into api_product_config (product_id, merchants_id, ",
"discount, operator_id, ", "discount, discount_price, ",
"operator_name, create_time, ", "operator_id, operator_name, ",
"update_time, `status`, ", "create_time, update_time, ",
"ext_1, ext_2, ext_3)", "`status`, ext_1, ext_2, ",
"ext_3)",
"values (#{productId,jdbcType=BIGINT}, #{merchantsId,jdbcType=BIGINT}, ", "values (#{productId,jdbcType=BIGINT}, #{merchantsId,jdbcType=BIGINT}, ",
"#{discount,jdbcType=DECIMAL}, #{operatorId,jdbcType=BIGINT}, ", "#{discount,jdbcType=DECIMAL}, #{discountPrice,jdbcType=DECIMAL}, ",
"#{operatorName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", "#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
"#{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(ApiProductConfig record); int insert(ApiProductConfig record);
@ -63,6 +65,7 @@ public interface ApiProductConfigMapper extends ApiProductConfigMapperExt {
@Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT), @Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT),
@Result(column="merchants_id", property="merchantsId", jdbcType=JdbcType.BIGINT), @Result(column="merchants_id", property="merchantsId", jdbcType=JdbcType.BIGINT),
@Result(column="discount", property="discount", jdbcType=JdbcType.DECIMAL), @Result(column="discount", property="discount", jdbcType=JdbcType.DECIMAL),
@Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT),
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -76,8 +79,8 @@ public interface ApiProductConfigMapper extends ApiProductConfigMapperExt {
@Select({ @Select({
"select", "select",
"id, product_id, merchants_id, discount, operator_id, operator_name, create_time, ", "id, product_id, merchants_id, discount, discount_price, operator_id, operator_name, ",
"update_time, `status`, ext_1, ext_2, ext_3", "create_time, update_time, `status`, ext_1, ext_2, ext_3",
"from api_product_config", "from api_product_config",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -86,6 +89,7 @@ public interface ApiProductConfigMapper extends ApiProductConfigMapperExt {
@Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT), @Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT),
@Result(column="merchants_id", property="merchantsId", jdbcType=JdbcType.BIGINT), @Result(column="merchants_id", property="merchantsId", jdbcType=JdbcType.BIGINT),
@Result(column="discount", property="discount", jdbcType=JdbcType.DECIMAL), @Result(column="discount", property="discount", jdbcType=JdbcType.DECIMAL),
@Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT),
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -111,6 +115,7 @@ public interface ApiProductConfigMapper extends ApiProductConfigMapperExt {
"set product_id = #{productId,jdbcType=BIGINT},", "set product_id = #{productId,jdbcType=BIGINT},",
"merchants_id = #{merchantsId,jdbcType=BIGINT},", "merchants_id = #{merchantsId,jdbcType=BIGINT},",
"discount = #{discount,jdbcType=DECIMAL},", "discount = #{discount,jdbcType=DECIMAL},",
"discount_price = #{discountPrice,jdbcType=DECIMAL},",
"operator_id = #{operatorId,jdbcType=BIGINT},", "operator_id = #{operatorId,jdbcType=BIGINT},",
"operator_name = #{operatorName,jdbcType=VARCHAR},", "operator_name = #{operatorName,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},", "create_time = #{createTime,jdbcType=TIMESTAMP},",

@ -40,6 +40,10 @@ public class ApiProductConfigSqlProvider {
sql.VALUES("discount", "#{discount,jdbcType=DECIMAL}"); sql.VALUES("discount", "#{discount,jdbcType=DECIMAL}");
} }
if (record.getDiscountPrice() != null) {
sql.VALUES("discount_price", "#{discountPrice,jdbcType=DECIMAL}");
}
if (record.getOperatorId() != null) { if (record.getOperatorId() != null) {
sql.VALUES("operator_id", "#{operatorId,jdbcType=BIGINT}"); sql.VALUES("operator_id", "#{operatorId,jdbcType=BIGINT}");
} }
@ -85,6 +89,7 @@ public class ApiProductConfigSqlProvider {
sql.SELECT("product_id"); sql.SELECT("product_id");
sql.SELECT("merchants_id"); sql.SELECT("merchants_id");
sql.SELECT("discount"); sql.SELECT("discount");
sql.SELECT("discount_price");
sql.SELECT("operator_id"); sql.SELECT("operator_id");
sql.SELECT("operator_name"); sql.SELECT("operator_name");
sql.SELECT("create_time"); sql.SELECT("create_time");
@ -126,6 +131,10 @@ public class ApiProductConfigSqlProvider {
sql.SET("discount = #{record.discount,jdbcType=DECIMAL}"); sql.SET("discount = #{record.discount,jdbcType=DECIMAL}");
} }
if (record.getDiscountPrice() != null) {
sql.SET("discount_price = #{record.discountPrice,jdbcType=DECIMAL}");
}
if (record.getOperatorId() != null) { if (record.getOperatorId() != null) {
sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}");
} }
@ -170,6 +179,7 @@ public class ApiProductConfigSqlProvider {
sql.SET("product_id = #{record.productId,jdbcType=BIGINT}"); sql.SET("product_id = #{record.productId,jdbcType=BIGINT}");
sql.SET("merchants_id = #{record.merchantsId,jdbcType=BIGINT}"); sql.SET("merchants_id = #{record.merchantsId,jdbcType=BIGINT}");
sql.SET("discount = #{record.discount,jdbcType=DECIMAL}"); sql.SET("discount = #{record.discount,jdbcType=DECIMAL}");
sql.SET("discount_price = #{record.discountPrice,jdbcType=DECIMAL}");
sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}");
sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}"); sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
@ -200,6 +210,10 @@ public class ApiProductConfigSqlProvider {
sql.SET("discount = #{discount,jdbcType=DECIMAL}"); sql.SET("discount = #{discount,jdbcType=DECIMAL}");
} }
if (record.getDiscountPrice() != null) {
sql.SET("discount_price = #{discountPrice,jdbcType=DECIMAL}");
}
if (record.getOperatorId() != null) { if (record.getOperatorId() != null) {
sql.SET("operator_id = #{operatorId,jdbcType=BIGINT}"); sql.SET("operator_id = #{operatorId,jdbcType=BIGINT}");
} }

@ -34,6 +34,11 @@ public class ApiProductConfig implements Serializable {
*/ */
private BigDecimal discount; private BigDecimal discount;
/**
* 折扣价格
*/
private BigDecimal discountPrice;
/** /**
* 操作人员id * 操作人员id
*/ */
@ -108,6 +113,14 @@ public class ApiProductConfig implements Serializable {
this.discount = discount; this.discount = discount;
} }
public BigDecimal getDiscountPrice() {
return discountPrice;
}
public void setDiscountPrice(BigDecimal discountPrice) {
this.discountPrice = discountPrice;
}
public Long getOperatorId() { public Long getOperatorId() {
return operatorId; return operatorId;
} }
@ -188,6 +201,7 @@ public class ApiProductConfig implements Serializable {
&& (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId())) && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
&& (this.getMerchantsId() == null ? other.getMerchantsId() == null : this.getMerchantsId().equals(other.getMerchantsId())) && (this.getMerchantsId() == null ? other.getMerchantsId() == null : this.getMerchantsId().equals(other.getMerchantsId()))
&& (this.getDiscount() == null ? other.getDiscount() == null : this.getDiscount().equals(other.getDiscount())) && (this.getDiscount() == null ? other.getDiscount() == null : this.getDiscount().equals(other.getDiscount()))
&& (this.getDiscountPrice() == null ? other.getDiscountPrice() == null : this.getDiscountPrice().equals(other.getDiscountPrice()))
&& (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId())) && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId()))
&& (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName())) && (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
@ -206,6 +220,7 @@ public class ApiProductConfig implements Serializable {
result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode()); result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
result = prime * result + ((getMerchantsId() == null) ? 0 : getMerchantsId().hashCode()); result = prime * result + ((getMerchantsId() == null) ? 0 : getMerchantsId().hashCode());
result = prime * result + ((getDiscount() == null) ? 0 : getDiscount().hashCode()); result = prime * result + ((getDiscount() == null) ? 0 : getDiscount().hashCode());
result = prime * result + ((getDiscountPrice() == null) ? 0 : getDiscountPrice().hashCode());
result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode()); result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().hashCode()); result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
@ -227,6 +242,7 @@ public class ApiProductConfig implements Serializable {
sb.append(", productId=").append(productId); sb.append(", productId=").append(productId);
sb.append(", merchantsId=").append(merchantsId); sb.append(", merchantsId=").append(merchantsId);
sb.append(", discount=").append(discount); sb.append(", discount=").append(discount);
sb.append(", discountPrice=").append(discountPrice);
sb.append(", operatorId=").append(operatorId); sb.append(", operatorId=").append(operatorId);
sb.append(", operatorName=").append(operatorName); sb.append(", operatorName=").append(operatorName);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);

@ -366,6 +366,66 @@ public class ApiProductConfigExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDiscountPriceIsNull() {
addCriterion("discount_price is null");
return (Criteria) this;
}
public Criteria andDiscountPriceIsNotNull() {
addCriterion("discount_price is not null");
return (Criteria) this;
}
public Criteria andDiscountPriceEqualTo(BigDecimal value) {
addCriterion("discount_price =", value, "discountPrice");
return (Criteria) this;
}
public Criteria andDiscountPriceNotEqualTo(BigDecimal value) {
addCriterion("discount_price <>", value, "discountPrice");
return (Criteria) this;
}
public Criteria andDiscountPriceGreaterThan(BigDecimal value) {
addCriterion("discount_price >", value, "discountPrice");
return (Criteria) this;
}
public Criteria andDiscountPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("discount_price >=", value, "discountPrice");
return (Criteria) this;
}
public Criteria andDiscountPriceLessThan(BigDecimal value) {
addCriterion("discount_price <", value, "discountPrice");
return (Criteria) this;
}
public Criteria andDiscountPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("discount_price <=", value, "discountPrice");
return (Criteria) this;
}
public Criteria andDiscountPriceIn(List<BigDecimal> values) {
addCriterion("discount_price in", values, "discountPrice");
return (Criteria) this;
}
public Criteria andDiscountPriceNotIn(List<BigDecimal> values) {
addCriterion("discount_price not in", values, "discountPrice");
return (Criteria) this;
}
public Criteria andDiscountPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("discount_price between", value1, value2, "discountPrice");
return (Criteria) this;
}
public Criteria andDiscountPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("discount_price not between", value1, value2, "discountPrice");
return (Criteria) this;
}
public Criteria andOperatorIdIsNull() { public Criteria andOperatorIdIsNull() {
addCriterion("operator_id is null"); addCriterion("operator_id is null");
return (Criteria) this; return (Criteria) this;

Loading…
Cancel
Save