diff --git a/service/src/main/java/com/hfkj/dao/BsOrderMapper.java b/service/src/main/java/com/hfkj/dao/BsOrderMapper.java index 2262bd5..9c31855 100644 --- a/service/src/main/java/com/hfkj/dao/BsOrderMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsOrderMapper.java @@ -42,21 +42,23 @@ public interface BsOrderMapper extends BsOrderMapperExt { "insert into bs_order (order_no, user_id, ", "user_phone, img, ", "goods_name, customParameters, ", - "goods_count, total_price, ", - "promotionAmount, `status`, ", - "create_time, pay_time, ", - "cancel_time, refund_time, ", - "finish_time, update_time, ", - "ext_1, ext_2, ext_3)", + "goods_count, `type`, ", + "total_price, promotionAmount, ", + "`status`, create_time, ", + "pay_time, cancel_time, ", + "refund_time, finish_time, ", + "update_time, ext_1, ", + "ext_2, ext_3)", "values (#{orderNo,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ", "#{userPhone,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, ", "#{goodsName,jdbcType=VARCHAR}, #{customparameters,jdbcType=VARCHAR}, ", - "#{goodsCount,jdbcType=INTEGER}, #{totalPrice,jdbcType=DECIMAL}, ", - "#{promotionamount,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", - "#{createTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ", - "#{cancelTime,jdbcType=TIMESTAMP}, #{refundTime,jdbcType=TIMESTAMP}, ", - "#{finishTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{goodsCount,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, ", + "#{totalPrice,jdbcType=DECIMAL}, #{promotionamount,jdbcType=DECIMAL}, ", + "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{payTime,jdbcType=TIMESTAMP}, #{cancelTime,jdbcType=TIMESTAMP}, ", + "#{refundTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(BsOrder record); @@ -75,6 +77,7 @@ public interface BsOrderMapper extends BsOrderMapperExt { @Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR), @Result(column="customParameters", property="customparameters", jdbcType=JdbcType.VARCHAR), @Result(column="goods_count", property="goodsCount", jdbcType=JdbcType.INTEGER), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="promotionAmount", property="promotionamount", jdbcType=JdbcType.DECIMAL), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -93,7 +96,7 @@ public interface BsOrderMapper extends BsOrderMapperExt { @Select({ "select", "id, order_no, user_id, user_phone, img, goods_name, customParameters, goods_count, ", - "total_price, promotionAmount, `status`, create_time, pay_time, cancel_time, ", + "`type`, total_price, promotionAmount, `status`, create_time, pay_time, cancel_time, ", "refund_time, finish_time, update_time, ext_1, ext_2, ext_3", "from bs_order", "where id = #{id,jdbcType=BIGINT}" @@ -107,6 +110,7 @@ public interface BsOrderMapper extends BsOrderMapperExt { @Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR), @Result(column="customParameters", property="customparameters", jdbcType=JdbcType.VARCHAR), @Result(column="goods_count", property="goodsCount", jdbcType=JdbcType.INTEGER), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), @Result(column="promotionAmount", property="promotionamount", jdbcType=JdbcType.DECIMAL), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -140,6 +144,7 @@ public interface BsOrderMapper extends BsOrderMapperExt { "goods_name = #{goodsName,jdbcType=VARCHAR},", "customParameters = #{customparameters,jdbcType=VARCHAR},", "goods_count = #{goodsCount,jdbcType=INTEGER},", + "`type` = #{type,jdbcType=INTEGER},", "total_price = #{totalPrice,jdbcType=DECIMAL},", "promotionAmount = #{promotionamount,jdbcType=DECIMAL},", "`status` = #{status,jdbcType=INTEGER},", diff --git a/service/src/main/java/com/hfkj/dao/BsOrderSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsOrderSqlProvider.java index cce9761..8b516e0 100644 --- a/service/src/main/java/com/hfkj/dao/BsOrderSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsOrderSqlProvider.java @@ -56,6 +56,10 @@ public class BsOrderSqlProvider { sql.VALUES("goods_count", "#{goodsCount,jdbcType=INTEGER}"); } + if (record.getType() != null) { + sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); + } + if (record.getTotalPrice() != null) { sql.VALUES("total_price", "#{totalPrice,jdbcType=DECIMAL}"); } @@ -121,6 +125,7 @@ public class BsOrderSqlProvider { sql.SELECT("goods_name"); sql.SELECT("customParameters"); sql.SELECT("goods_count"); + sql.SELECT("`type`"); sql.SELECT("total_price"); sql.SELECT("promotionAmount"); sql.SELECT("`status`"); @@ -182,6 +187,10 @@ public class BsOrderSqlProvider { sql.SET("goods_count = #{record.goodsCount,jdbcType=INTEGER}"); } + if (record.getType() != null) { + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + } + if (record.getTotalPrice() != null) { sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}"); } @@ -246,6 +255,7 @@ public class BsOrderSqlProvider { sql.SET("goods_name = #{record.goodsName,jdbcType=VARCHAR}"); sql.SET("customParameters = #{record.customparameters,jdbcType=VARCHAR}"); sql.SET("goods_count = #{record.goodsCount,jdbcType=INTEGER}"); + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}"); sql.SET("promotionAmount = #{record.promotionamount,jdbcType=DECIMAL}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); @@ -296,6 +306,10 @@ public class BsOrderSqlProvider { sql.SET("goods_count = #{goodsCount,jdbcType=INTEGER}"); } + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + if (record.getTotalPrice() != null) { sql.SET("total_price = #{totalPrice,jdbcType=DECIMAL}"); } diff --git a/service/src/main/java/com/hfkj/entity/BsOrder.java b/service/src/main/java/com/hfkj/entity/BsOrder.java index 4a7dbe3..22587ff 100644 --- a/service/src/main/java/com/hfkj/entity/BsOrder.java +++ b/service/src/main/java/com/hfkj/entity/BsOrder.java @@ -54,6 +54,11 @@ public class BsOrder implements Serializable { */ private Integer goodsCount; + /** + * 类型 1:淘宝 2:拼多多 + */ + private Integer type; + /** * 交易金额 */ @@ -171,6 +176,14 @@ public class BsOrder implements Serializable { this.goodsCount = goodsCount; } + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + public BigDecimal getTotalPrice() { return totalPrice; } @@ -287,6 +300,7 @@ public class BsOrder implements Serializable { && (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName())) && (this.getCustomparameters() == null ? other.getCustomparameters() == null : this.getCustomparameters().equals(other.getCustomparameters())) && (this.getGoodsCount() == null ? other.getGoodsCount() == null : this.getGoodsCount().equals(other.getGoodsCount())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice())) && (this.getPromotionamount() == null ? other.getPromotionamount() == null : this.getPromotionamount().equals(other.getPromotionamount())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) @@ -313,6 +327,7 @@ public class BsOrder implements Serializable { result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode()); result = prime * result + ((getCustomparameters() == null) ? 0 : getCustomparameters().hashCode()); result = prime * result + ((getGoodsCount() == null) ? 0 : getGoodsCount().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode()); result = prime * result + ((getPromotionamount() == null) ? 0 : getPromotionamount().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); @@ -342,6 +357,7 @@ public class BsOrder implements Serializable { sb.append(", goodsName=").append(goodsName); sb.append(", customparameters=").append(customparameters); sb.append(", goodsCount=").append(goodsCount); + sb.append(", type=").append(type); sb.append(", totalPrice=").append(totalPrice); sb.append(", promotionamount=").append(promotionamount); sb.append(", status=").append(status); diff --git a/service/src/main/java/com/hfkj/entity/BsOrderExample.java b/service/src/main/java/com/hfkj/entity/BsOrderExample.java index 4e9a40a..868a165 100644 --- a/service/src/main/java/com/hfkj/entity/BsOrderExample.java +++ b/service/src/main/java/com/hfkj/entity/BsOrderExample.java @@ -656,6 +656,66 @@ public class BsOrderExample { return (Criteria) this; } + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Integer value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Integer value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Integer value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Integer value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Integer value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Integer value1, Integer value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Integer value1, Integer value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + public Criteria andTotalPriceIsNull() { addCriterion("total_price is null"); return (Criteria) this;