diff --git a/hai-service/src/main/java/com/hai/dao/GoodsShoppingCartMapper.java b/hai-service/src/main/java/com/hai/dao/GoodsShoppingCartMapper.java index a428a700..7b70b25b 100644 --- a/hai-service/src/main/java/com/hai/dao/GoodsShoppingCartMapper.java +++ b/hai-service/src/main/java/com/hai/dao/GoodsShoppingCartMapper.java @@ -41,13 +41,15 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt { @Insert({ "insert into goods_shopping_cart (goods_id, user_id, ", "title, img, sku, ", - "num, price, whether_check, ", + "num, price, original_price, ", + "whether_check, lose_efficacy, ", "create_time, update_time, ", "op_id, op_name, ext_1, ", "ext_2, ext_3)", "values (#{goodsId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, ", "#{title,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, #{sku,jdbcType=VARCHAR}, ", - "#{num,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{whetherCheck,jdbcType=BIT}, ", + "#{num,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{originalPrice,jdbcType=DECIMAL}, ", + "#{whetherCheck,jdbcType=BIT}, #{loseEfficacy,jdbcType=BIT}, ", "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", "#{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" @@ -69,7 +71,9 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt { @Result(column="sku", property="sku", jdbcType=JdbcType.VARCHAR), @Result(column="num", property="num", jdbcType=JdbcType.VARCHAR), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), + @Result(column="original_price", property="originalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="whether_check", property="whetherCheck", jdbcType=JdbcType.BIT), + @Result(column="lose_efficacy", property="loseEfficacy", jdbcType=JdbcType.BIT), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), @@ -82,8 +86,8 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt { @Select({ "select", - "id, goods_id, user_id, title, img, sku, num, price, whether_check, create_time, ", - "update_time, op_id, op_name, ext_1, ext_2, ext_3", + "id, goods_id, user_id, title, img, sku, num, price, original_price, whether_check, ", + "lose_efficacy, create_time, update_time, op_id, op_name, ext_1, ext_2, ext_3", "from goods_shopping_cart", "where id = #{id,jdbcType=BIGINT}" }) @@ -96,7 +100,9 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt { @Result(column="sku", property="sku", jdbcType=JdbcType.VARCHAR), @Result(column="num", property="num", jdbcType=JdbcType.VARCHAR), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), + @Result(column="original_price", property="originalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="whether_check", property="whetherCheck", jdbcType=JdbcType.BIT), + @Result(column="lose_efficacy", property="loseEfficacy", jdbcType=JdbcType.BIT), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), @@ -125,7 +131,9 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt { "sku = #{sku,jdbcType=VARCHAR},", "num = #{num,jdbcType=VARCHAR},", "price = #{price,jdbcType=DECIMAL},", + "original_price = #{originalPrice,jdbcType=DECIMAL},", "whether_check = #{whetherCheck,jdbcType=BIT},", + "lose_efficacy = #{loseEfficacy,jdbcType=BIT},", "create_time = #{createTime,jdbcType=TIMESTAMP},", "update_time = #{updateTime,jdbcType=TIMESTAMP},", "op_id = #{opId,jdbcType=BIGINT},", diff --git a/hai-service/src/main/java/com/hai/dao/GoodsShoppingCartSqlProvider.java b/hai-service/src/main/java/com/hai/dao/GoodsShoppingCartSqlProvider.java index cd8000e5..5a3cb605 100644 --- a/hai-service/src/main/java/com/hai/dao/GoodsShoppingCartSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/GoodsShoppingCartSqlProvider.java @@ -56,10 +56,18 @@ public class GoodsShoppingCartSqlProvider { sql.VALUES("price", "#{price,jdbcType=DECIMAL}"); } + if (record.getOriginalPrice() != null) { + sql.VALUES("original_price", "#{originalPrice,jdbcType=DECIMAL}"); + } + if (record.getWhetherCheck() != null) { sql.VALUES("whether_check", "#{whetherCheck,jdbcType=BIT}"); } + if (record.getLoseEfficacy() != null) { + sql.VALUES("lose_efficacy", "#{loseEfficacy,jdbcType=BIT}"); + } + if (record.getCreateTime() != null) { sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); } @@ -105,7 +113,9 @@ public class GoodsShoppingCartSqlProvider { sql.SELECT("sku"); sql.SELECT("num"); sql.SELECT("price"); + sql.SELECT("original_price"); sql.SELECT("whether_check"); + sql.SELECT("lose_efficacy"); sql.SELECT("create_time"); sql.SELECT("update_time"); sql.SELECT("op_id"); @@ -162,10 +172,18 @@ public class GoodsShoppingCartSqlProvider { sql.SET("price = #{record.price,jdbcType=DECIMAL}"); } + if (record.getOriginalPrice() != null) { + sql.SET("original_price = #{record.originalPrice,jdbcType=DECIMAL}"); + } + if (record.getWhetherCheck() != null) { sql.SET("whether_check = #{record.whetherCheck,jdbcType=BIT}"); } + if (record.getLoseEfficacy() != null) { + sql.SET("lose_efficacy = #{record.loseEfficacy,jdbcType=BIT}"); + } + if (record.getCreateTime() != null) { sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); } @@ -210,7 +228,9 @@ public class GoodsShoppingCartSqlProvider { sql.SET("sku = #{record.sku,jdbcType=VARCHAR}"); sql.SET("num = #{record.num,jdbcType=VARCHAR}"); sql.SET("price = #{record.price,jdbcType=DECIMAL}"); + sql.SET("original_price = #{record.originalPrice,jdbcType=DECIMAL}"); sql.SET("whether_check = #{record.whetherCheck,jdbcType=BIT}"); + sql.SET("lose_efficacy = #{record.loseEfficacy,jdbcType=BIT}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); @@ -256,10 +276,18 @@ public class GoodsShoppingCartSqlProvider { sql.SET("price = #{price,jdbcType=DECIMAL}"); } + if (record.getOriginalPrice() != null) { + sql.SET("original_price = #{originalPrice,jdbcType=DECIMAL}"); + } + if (record.getWhetherCheck() != null) { sql.SET("whether_check = #{whetherCheck,jdbcType=BIT}"); } + if (record.getLoseEfficacy() != null) { + sql.SET("lose_efficacy = #{loseEfficacy,jdbcType=BIT}"); + } + if (record.getCreateTime() != null) { sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); } diff --git a/hai-service/src/main/java/com/hai/entity/GoodsShoppingCart.java b/hai-service/src/main/java/com/hai/entity/GoodsShoppingCart.java index e61a3ba9..a5e297c7 100644 --- a/hai-service/src/main/java/com/hai/entity/GoodsShoppingCart.java +++ b/hai-service/src/main/java/com/hai/entity/GoodsShoppingCart.java @@ -54,11 +54,21 @@ public class GoodsShoppingCart implements Serializable { */ private BigDecimal price; + /** + * 原价 + */ + private BigDecimal originalPrice; + /** * 是否选中 */ private Boolean whetherCheck; + /** + * 是否失效 + */ + private Boolean loseEfficacy; + /** * 创建时间 */ @@ -160,6 +170,14 @@ public class GoodsShoppingCart implements Serializable { this.price = price; } + public BigDecimal getOriginalPrice() { + return originalPrice; + } + + public void setOriginalPrice(BigDecimal originalPrice) { + this.originalPrice = originalPrice; + } + public Boolean getWhetherCheck() { return whetherCheck; } @@ -168,6 +186,14 @@ public class GoodsShoppingCart implements Serializable { this.whetherCheck = whetherCheck; } + public Boolean getLoseEfficacy() { + return loseEfficacy; + } + + public void setLoseEfficacy(Boolean loseEfficacy) { + this.loseEfficacy = loseEfficacy; + } + public Date getCreateTime() { return createTime; } @@ -244,7 +270,9 @@ public class GoodsShoppingCart implements Serializable { && (this.getSku() == null ? other.getSku() == null : this.getSku().equals(other.getSku())) && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum())) && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) + && (this.getOriginalPrice() == null ? other.getOriginalPrice() == null : this.getOriginalPrice().equals(other.getOriginalPrice())) && (this.getWhetherCheck() == null ? other.getWhetherCheck() == null : this.getWhetherCheck().equals(other.getWhetherCheck())) + && (this.getLoseEfficacy() == null ? other.getLoseEfficacy() == null : this.getLoseEfficacy().equals(other.getLoseEfficacy())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId())) @@ -266,7 +294,9 @@ public class GoodsShoppingCart implements Serializable { result = prime * result + ((getSku() == null) ? 0 : getSku().hashCode()); result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode()); result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); + result = prime * result + ((getOriginalPrice() == null) ? 0 : getOriginalPrice().hashCode()); result = prime * result + ((getWhetherCheck() == null) ? 0 : getWhetherCheck().hashCode()); + result = prime * result + ((getLoseEfficacy() == null) ? 0 : getLoseEfficacy().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode()); @@ -291,7 +321,9 @@ public class GoodsShoppingCart implements Serializable { sb.append(", sku=").append(sku); sb.append(", num=").append(num); sb.append(", price=").append(price); + sb.append(", originalPrice=").append(originalPrice); sb.append(", whetherCheck=").append(whetherCheck); + sb.append(", loseEfficacy=").append(loseEfficacy); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", opId=").append(opId); diff --git a/hai-service/src/main/java/com/hai/entity/GoodsShoppingCartExample.java b/hai-service/src/main/java/com/hai/entity/GoodsShoppingCartExample.java index e4caca38..15ab9266 100644 --- a/hai-service/src/main/java/com/hai/entity/GoodsShoppingCartExample.java +++ b/hai-service/src/main/java/com/hai/entity/GoodsShoppingCartExample.java @@ -646,6 +646,66 @@ public class GoodsShoppingCartExample { return (Criteria) this; } + public Criteria andOriginalPriceIsNull() { + addCriterion("original_price is null"); + return (Criteria) this; + } + + public Criteria andOriginalPriceIsNotNull() { + addCriterion("original_price is not null"); + return (Criteria) this; + } + + public Criteria andOriginalPriceEqualTo(BigDecimal value) { + addCriterion("original_price =", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceNotEqualTo(BigDecimal value) { + addCriterion("original_price <>", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceGreaterThan(BigDecimal value) { + addCriterion("original_price >", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("original_price >=", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceLessThan(BigDecimal value) { + addCriterion("original_price <", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("original_price <=", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceIn(List values) { + addCriterion("original_price in", values, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceNotIn(List values) { + addCriterion("original_price not in", values, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("original_price between", value1, value2, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("original_price not between", value1, value2, "originalPrice"); + return (Criteria) this; + } + public Criteria andWhetherCheckIsNull() { addCriterion("whether_check is null"); return (Criteria) this; @@ -706,6 +766,66 @@ public class GoodsShoppingCartExample { return (Criteria) this; } + public Criteria andLoseEfficacyIsNull() { + addCriterion("lose_efficacy is null"); + return (Criteria) this; + } + + public Criteria andLoseEfficacyIsNotNull() { + addCriterion("lose_efficacy is not null"); + return (Criteria) this; + } + + public Criteria andLoseEfficacyEqualTo(Boolean value) { + addCriterion("lose_efficacy =", value, "loseEfficacy"); + return (Criteria) this; + } + + public Criteria andLoseEfficacyNotEqualTo(Boolean value) { + addCriterion("lose_efficacy <>", value, "loseEfficacy"); + return (Criteria) this; + } + + public Criteria andLoseEfficacyGreaterThan(Boolean value) { + addCriterion("lose_efficacy >", value, "loseEfficacy"); + return (Criteria) this; + } + + public Criteria andLoseEfficacyGreaterThanOrEqualTo(Boolean value) { + addCriterion("lose_efficacy >=", value, "loseEfficacy"); + return (Criteria) this; + } + + public Criteria andLoseEfficacyLessThan(Boolean value) { + addCriterion("lose_efficacy <", value, "loseEfficacy"); + return (Criteria) this; + } + + public Criteria andLoseEfficacyLessThanOrEqualTo(Boolean value) { + addCriterion("lose_efficacy <=", value, "loseEfficacy"); + return (Criteria) this; + } + + public Criteria andLoseEfficacyIn(List values) { + addCriterion("lose_efficacy in", values, "loseEfficacy"); + return (Criteria) this; + } + + public Criteria andLoseEfficacyNotIn(List values) { + addCriterion("lose_efficacy not in", values, "loseEfficacy"); + return (Criteria) this; + } + + public Criteria andLoseEfficacyBetween(Boolean value1, Boolean value2) { + addCriterion("lose_efficacy between", value1, value2, "loseEfficacy"); + return (Criteria) this; + } + + public Criteria andLoseEfficacyNotBetween(Boolean value1, Boolean value2) { + addCriterion("lose_efficacy not between", value1, value2, "loseEfficacy"); + return (Criteria) this; + } + public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this;