From c274c08e35656a884d028077716bd22413eb7a3d Mon Sep 17 00:00:00 2001 From: zdx <1810554661@qq.com> Date: Fri, 7 Jan 2022 16:47:19 +0800 Subject: [PATCH] 1 --- .../dao/HighDiscountPackageActualMapper.java | 13 ++-- .../HighDiscountPackageActualSqlProvider.java | 14 ++++ .../hai/entity/HighDiscountPackageActual.java | 16 +++++ .../HighDiscountPackageActualExample.java | 70 +++++++++++++++++++ 4 files changed, 108 insertions(+), 5 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageActualMapper.java b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageActualMapper.java index 56c748c6..87f419c6 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageActualMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageActualMapper.java @@ -42,13 +42,13 @@ public interface HighDiscountPackageActualMapper extends HighDiscountPackageActu "insert into high_discount_package_actual (discount_package_id, created_user_id, ", "created_time, user_id, ", "allocation_time, child_order_id, ", - "`status`, ext_1, ext_2, ", - "ext_3)", + "batch, `status`, ext_1, ", + "ext_2, ext_3)", "values (#{discountPackageId,jdbcType=INTEGER}, #{createdUserId,jdbcType=INTEGER}, ", "#{createdTime,jdbcType=TIMESTAMP}, #{userId,jdbcType=INTEGER}, ", "#{allocationTime,jdbcType=TIMESTAMP}, #{childOrderId,jdbcType=BIGINT}, ", - "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", - "#{ext3,jdbcType=VARCHAR})" + "#{batch,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(HighDiscountPackageActual record); @@ -66,6 +66,7 @@ public interface HighDiscountPackageActualMapper extends HighDiscountPackageActu @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), @Result(column="allocation_time", property="allocationTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), + @Result(column="batch", property="batch", jdbcType=JdbcType.VARCHAR), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @@ -76,7 +77,7 @@ public interface HighDiscountPackageActualMapper extends HighDiscountPackageActu @Select({ "select", "id, discount_package_id, created_user_id, created_time, user_id, allocation_time, ", - "child_order_id, `status`, ext_1, ext_2, ext_3", + "child_order_id, batch, `status`, ext_1, ext_2, ext_3", "from high_discount_package_actual", "where id = #{id,jdbcType=INTEGER}" }) @@ -88,6 +89,7 @@ public interface HighDiscountPackageActualMapper extends HighDiscountPackageActu @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), @Result(column="allocation_time", property="allocationTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), + @Result(column="batch", property="batch", jdbcType=JdbcType.VARCHAR), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @@ -112,6 +114,7 @@ public interface HighDiscountPackageActualMapper extends HighDiscountPackageActu "user_id = #{userId,jdbcType=INTEGER},", "allocation_time = #{allocationTime,jdbcType=TIMESTAMP},", "child_order_id = #{childOrderId,jdbcType=BIGINT},", + "batch = #{batch,jdbcType=VARCHAR},", "`status` = #{status,jdbcType=INTEGER},", "ext_1 = #{ext1,jdbcType=VARCHAR},", "ext_2 = #{ext2,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageActualSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageActualSqlProvider.java index d28d118d..2acaad70 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageActualSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageActualSqlProvider.java @@ -52,6 +52,10 @@ public class HighDiscountPackageActualSqlProvider { sql.VALUES("child_order_id", "#{childOrderId,jdbcType=BIGINT}"); } + if (record.getBatch() != null) { + sql.VALUES("batch", "#{batch,jdbcType=VARCHAR}"); + } + if (record.getStatus() != null) { sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); } @@ -84,6 +88,7 @@ public class HighDiscountPackageActualSqlProvider { sql.SELECT("user_id"); sql.SELECT("allocation_time"); sql.SELECT("child_order_id"); + sql.SELECT("batch"); sql.SELECT("`status`"); sql.SELECT("ext_1"); sql.SELECT("ext_2"); @@ -133,6 +138,10 @@ public class HighDiscountPackageActualSqlProvider { sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}"); } + if (record.getBatch() != null) { + sql.SET("batch = #{record.batch,jdbcType=VARCHAR}"); + } + if (record.getStatus() != null) { sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); } @@ -164,6 +173,7 @@ public class HighDiscountPackageActualSqlProvider { sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); sql.SET("allocation_time = #{record.allocationTime,jdbcType=TIMESTAMP}"); sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}"); + sql.SET("batch = #{record.batch,jdbcType=VARCHAR}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); @@ -202,6 +212,10 @@ public class HighDiscountPackageActualSqlProvider { sql.SET("child_order_id = #{childOrderId,jdbcType=BIGINT}"); } + if (record.getBatch() != null) { + sql.SET("batch = #{batch,jdbcType=VARCHAR}"); + } + if (record.getStatus() != null) { sql.SET("`status` = #{status,jdbcType=INTEGER}"); } diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageActual.java b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageActual.java index 1f7c30d7..0fdb03f8 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageActual.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageActual.java @@ -48,6 +48,11 @@ public class HighDiscountPackageActual implements Serializable { */ private Long childOrderId; + /** + * 生成批次 + */ + private String batch; + /** * 状态: 1: 待分配 2:预分配(售卖)3:已分配 */ @@ -126,6 +131,14 @@ public class HighDiscountPackageActual implements Serializable { this.childOrderId = childOrderId; } + public String getBatch() { + return batch; + } + + public void setBatch(String batch) { + this.batch = batch; + } + public Integer getStatus() { return status; } @@ -177,6 +190,7 @@ public class HighDiscountPackageActual implements Serializable { && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getAllocationTime() == null ? other.getAllocationTime() == null : this.getAllocationTime().equals(other.getAllocationTime())) && (this.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId())) + && (this.getBatch() == null ? other.getBatch() == null : this.getBatch().equals(other.getBatch())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) @@ -194,6 +208,7 @@ public class HighDiscountPackageActual implements Serializable { result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getAllocationTime() == null) ? 0 : getAllocationTime().hashCode()); result = prime * result + ((getChildOrderId() == null) ? 0 : getChildOrderId().hashCode()); + result = prime * result + ((getBatch() == null) ? 0 : getBatch().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); @@ -214,6 +229,7 @@ public class HighDiscountPackageActual implements Serializable { sb.append(", userId=").append(userId); sb.append(", allocationTime=").append(allocationTime); sb.append(", childOrderId=").append(childOrderId); + sb.append(", batch=").append(batch); sb.append(", status=").append(status); sb.append(", ext1=").append(ext1); sb.append(", ext2=").append(ext2); diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageActualExample.java b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageActualExample.java index 2504f371..e5c2ca37 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageActualExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageActualExample.java @@ -545,6 +545,76 @@ public class HighDiscountPackageActualExample { return (Criteria) this; } + public Criteria andBatchIsNull() { + addCriterion("batch is null"); + return (Criteria) this; + } + + public Criteria andBatchIsNotNull() { + addCriterion("batch is not null"); + return (Criteria) this; + } + + public Criteria andBatchEqualTo(String value) { + addCriterion("batch =", value, "batch"); + return (Criteria) this; + } + + public Criteria andBatchNotEqualTo(String value) { + addCriterion("batch <>", value, "batch"); + return (Criteria) this; + } + + public Criteria andBatchGreaterThan(String value) { + addCriterion("batch >", value, "batch"); + return (Criteria) this; + } + + public Criteria andBatchGreaterThanOrEqualTo(String value) { + addCriterion("batch >=", value, "batch"); + return (Criteria) this; + } + + public Criteria andBatchLessThan(String value) { + addCriterion("batch <", value, "batch"); + return (Criteria) this; + } + + public Criteria andBatchLessThanOrEqualTo(String value) { + addCriterion("batch <=", value, "batch"); + return (Criteria) this; + } + + public Criteria andBatchLike(String value) { + addCriterion("batch like", value, "batch"); + return (Criteria) this; + } + + public Criteria andBatchNotLike(String value) { + addCriterion("batch not like", value, "batch"); + return (Criteria) this; + } + + public Criteria andBatchIn(List values) { + addCriterion("batch in", values, "batch"); + return (Criteria) this; + } + + public Criteria andBatchNotIn(List values) { + addCriterion("batch not in", values, "batch"); + return (Criteria) this; + } + + public Criteria andBatchBetween(String value1, String value2) { + addCriterion("batch between", value1, value2, "batch"); + return (Criteria) this; + } + + public Criteria andBatchNotBetween(String value1, String value2) { + addCriterion("batch not between", value1, value2, "batch"); + return (Criteria) this; + } + public Criteria andStatusIsNull() { addCriterion("`status` is null"); return (Criteria) this;