diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageDeliverMapper.java b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageDeliverMapper.java index c81a387c..0de45cf6 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageDeliverMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageDeliverMapper.java @@ -39,12 +39,14 @@ public interface HighDiscountPackageDeliverMapper extends HighDiscountPackageDel int deleteByPrimaryKey(Long id); @Insert({ - "insert into high_discount_package_deliver (serial_number, package_id, ", + "insert into high_discount_package_deliver (source_type, source_id, ", + "package_id, serial_number, ", "package_name, create_time, ", "`status`, op_user_id, ", "op_user_name, ext_1, ", "ext_2, ext_3)", - "values (#{serialNumber,jdbcType=VARCHAR}, #{packageId,jdbcType=BIGINT}, ", + "values (#{sourceType,jdbcType=INTEGER}, #{sourceId,jdbcType=VARCHAR}, ", + "#{packageId,jdbcType=BIGINT}, #{serialNumber,jdbcType=VARCHAR}, ", "#{packageName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", "#{status,jdbcType=INTEGER}, #{opUserId,jdbcType=BIGINT}, ", "#{opUserName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", @@ -60,8 +62,10 @@ public interface HighDiscountPackageDeliverMapper extends HighDiscountPackageDel @SelectProvider(type=HighDiscountPackageDeliverSqlProvider.class, method="selectByExample") @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), - @Result(column="serial_number", property="serialNumber", jdbcType=JdbcType.VARCHAR), + @Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), + @Result(column="source_id", property="sourceId", jdbcType=JdbcType.VARCHAR), @Result(column="package_id", property="packageId", jdbcType=JdbcType.BIGINT), + @Result(column="serial_number", property="serialNumber", jdbcType=JdbcType.VARCHAR), @Result(column="package_name", property="packageName", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -75,15 +79,17 @@ public interface HighDiscountPackageDeliverMapper extends HighDiscountPackageDel @Select({ "select", - "id, serial_number, package_id, package_name, create_time, `status`, op_user_id, ", - "op_user_name, ext_1, ext_2, ext_3", + "id, source_type, source_id, package_id, serial_number, package_name, create_time, ", + "`status`, op_user_id, op_user_name, ext_1, ext_2, ext_3", "from high_discount_package_deliver", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), - @Result(column="serial_number", property="serialNumber", jdbcType=JdbcType.VARCHAR), + @Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), + @Result(column="source_id", property="sourceId", jdbcType=JdbcType.VARCHAR), @Result(column="package_id", property="packageId", jdbcType=JdbcType.BIGINT), + @Result(column="serial_number", property="serialNumber", jdbcType=JdbcType.VARCHAR), @Result(column="package_name", property="packageName", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -106,8 +112,10 @@ public interface HighDiscountPackageDeliverMapper extends HighDiscountPackageDel @Update({ "update high_discount_package_deliver", - "set serial_number = #{serialNumber,jdbcType=VARCHAR},", + "set source_type = #{sourceType,jdbcType=INTEGER},", + "source_id = #{sourceId,jdbcType=VARCHAR},", "package_id = #{packageId,jdbcType=BIGINT},", + "serial_number = #{serialNumber,jdbcType=VARCHAR},", "package_name = #{packageName,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},", "`status` = #{status,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageDeliverSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageDeliverSqlProvider.java index a37a703e..710bba2c 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountPackageDeliverSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountPackageDeliverSqlProvider.java @@ -28,14 +28,22 @@ public class HighDiscountPackageDeliverSqlProvider { SQL sql = new SQL(); sql.INSERT_INTO("high_discount_package_deliver"); - if (record.getSerialNumber() != null) { - sql.VALUES("serial_number", "#{serialNumber,jdbcType=VARCHAR}"); + if (record.getSourceType() != null) { + sql.VALUES("source_type", "#{sourceType,jdbcType=INTEGER}"); + } + + if (record.getSourceId() != null) { + sql.VALUES("source_id", "#{sourceId,jdbcType=VARCHAR}"); } if (record.getPackageId() != null) { sql.VALUES("package_id", "#{packageId,jdbcType=BIGINT}"); } + if (record.getSerialNumber() != null) { + sql.VALUES("serial_number", "#{serialNumber,jdbcType=VARCHAR}"); + } + if (record.getPackageName() != null) { sql.VALUES("package_name", "#{packageName,jdbcType=VARCHAR}"); } @@ -78,8 +86,10 @@ public class HighDiscountPackageDeliverSqlProvider { } else { sql.SELECT("id"); } - sql.SELECT("serial_number"); + sql.SELECT("source_type"); + sql.SELECT("source_id"); sql.SELECT("package_id"); + sql.SELECT("serial_number"); sql.SELECT("package_name"); sql.SELECT("create_time"); sql.SELECT("`status`"); @@ -109,14 +119,22 @@ public class HighDiscountPackageDeliverSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); } - if (record.getSerialNumber() != null) { - sql.SET("serial_number = #{record.serialNumber,jdbcType=VARCHAR}"); + if (record.getSourceType() != null) { + sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); + } + + if (record.getSourceId() != null) { + sql.SET("source_id = #{record.sourceId,jdbcType=VARCHAR}"); } if (record.getPackageId() != null) { sql.SET("package_id = #{record.packageId,jdbcType=BIGINT}"); } + if (record.getSerialNumber() != null) { + sql.SET("serial_number = #{record.serialNumber,jdbcType=VARCHAR}"); + } + if (record.getPackageName() != null) { sql.SET("package_name = #{record.packageName,jdbcType=VARCHAR}"); } @@ -158,8 +176,10 @@ public class HighDiscountPackageDeliverSqlProvider { sql.UPDATE("high_discount_package_deliver"); sql.SET("id = #{record.id,jdbcType=BIGINT}"); - sql.SET("serial_number = #{record.serialNumber,jdbcType=VARCHAR}"); + sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); + sql.SET("source_id = #{record.sourceId,jdbcType=VARCHAR}"); sql.SET("package_id = #{record.packageId,jdbcType=BIGINT}"); + sql.SET("serial_number = #{record.serialNumber,jdbcType=VARCHAR}"); sql.SET("package_name = #{record.packageName,jdbcType=VARCHAR}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); @@ -178,14 +198,22 @@ public class HighDiscountPackageDeliverSqlProvider { SQL sql = new SQL(); sql.UPDATE("high_discount_package_deliver"); - if (record.getSerialNumber() != null) { - sql.SET("serial_number = #{serialNumber,jdbcType=VARCHAR}"); + if (record.getSourceType() != null) { + sql.SET("source_type = #{sourceType,jdbcType=INTEGER}"); + } + + if (record.getSourceId() != null) { + sql.SET("source_id = #{sourceId,jdbcType=VARCHAR}"); } if (record.getPackageId() != null) { sql.SET("package_id = #{packageId,jdbcType=BIGINT}"); } + if (record.getSerialNumber() != null) { + sql.SET("serial_number = #{serialNumber,jdbcType=VARCHAR}"); + } + if (record.getPackageName() != null) { sql.SET("package_name = #{packageName,jdbcType=VARCHAR}"); } diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageDeliver.java b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageDeliver.java index 4b22c169..d228e665 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageDeliver.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageDeliver.java @@ -19,18 +19,22 @@ public class HighDiscountPackageDeliver implements Serializable { private Long id; /** - * 记录序号 + * 来源类型:1:嗨森逛 2:第三方平台 */ - private String serialNumber; + private Integer sourceType; /** - * 卷包id + * 来源id */ - private Long packageId; + private String sourceId; /** - * 卷包名称 + * 卷包id */ + private Long packageId; + + private String serialNumber; + private String packageName; /** @@ -39,7 +43,7 @@ public class HighDiscountPackageDeliver implements Serializable { private Date createTime; /** - * 状态 1:进行中 2:已完成 + * 1:领取中 2:已领取 */ private Integer status; @@ -48,9 +52,6 @@ public class HighDiscountPackageDeliver implements Serializable { */ private Long opUserId; - /** - * 操作人名称 - */ private String opUserName; private String ext1; @@ -69,12 +70,20 @@ public class HighDiscountPackageDeliver implements Serializable { this.id = id; } - public String getSerialNumber() { - return serialNumber; + public Integer getSourceType() { + return sourceType; } - public void setSerialNumber(String serialNumber) { - this.serialNumber = serialNumber; + public void setSourceType(Integer sourceType) { + this.sourceType = sourceType; + } + + public String getSourceId() { + return sourceId; + } + + public void setSourceId(String sourceId) { + this.sourceId = sourceId; } public Long getPackageId() { @@ -85,6 +94,14 @@ public class HighDiscountPackageDeliver implements Serializable { this.packageId = packageId; } + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + public String getPackageName() { return packageName; } @@ -162,8 +179,10 @@ public class HighDiscountPackageDeliver implements Serializable { } HighDiscountPackageDeliver other = (HighDiscountPackageDeliver) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getSerialNumber() == null ? other.getSerialNumber() == null : this.getSerialNumber().equals(other.getSerialNumber())) + && (this.getSourceType() == null ? other.getSourceType() == null : this.getSourceType().equals(other.getSourceType())) + && (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId())) && (this.getPackageId() == null ? other.getPackageId() == null : this.getPackageId().equals(other.getPackageId())) + && (this.getSerialNumber() == null ? other.getSerialNumber() == null : this.getSerialNumber().equals(other.getSerialNumber())) && (this.getPackageName() == null ? other.getPackageName() == null : this.getPackageName().equals(other.getPackageName())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) @@ -179,8 +198,10 @@ public class HighDiscountPackageDeliver implements Serializable { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getSerialNumber() == null) ? 0 : getSerialNumber().hashCode()); + result = prime * result + ((getSourceType() == null) ? 0 : getSourceType().hashCode()); + result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode()); result = prime * result + ((getPackageId() == null) ? 0 : getPackageId().hashCode()); + result = prime * result + ((getSerialNumber() == null) ? 0 : getSerialNumber().hashCode()); result = prime * result + ((getPackageName() == null) ? 0 : getPackageName().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); @@ -199,8 +220,10 @@ public class HighDiscountPackageDeliver implements Serializable { sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); - sb.append(", serialNumber=").append(serialNumber); + sb.append(", sourceType=").append(sourceType); + sb.append(", sourceId=").append(sourceId); sb.append(", packageId=").append(packageId); + sb.append(", serialNumber=").append(serialNumber); sb.append(", packageName=").append(packageName); sb.append(", createTime=").append(createTime); sb.append(", status=").append(status); diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageDeliverExample.java b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageDeliverExample.java index 730ebe8d..4d47ac86 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountPackageDeliverExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountPackageDeliverExample.java @@ -185,73 +185,133 @@ public class HighDiscountPackageDeliverExample { return (Criteria) this; } - public Criteria andSerialNumberIsNull() { - addCriterion("serial_number is null"); + public Criteria andSourceTypeIsNull() { + addCriterion("source_type is null"); return (Criteria) this; } - public Criteria andSerialNumberIsNotNull() { - addCriterion("serial_number is not null"); + public Criteria andSourceTypeIsNotNull() { + addCriterion("source_type is not null"); return (Criteria) this; } - public Criteria andSerialNumberEqualTo(String value) { - addCriterion("serial_number =", value, "serialNumber"); + public Criteria andSourceTypeEqualTo(Integer value) { + addCriterion("source_type =", value, "sourceType"); return (Criteria) this; } - public Criteria andSerialNumberNotEqualTo(String value) { - addCriterion("serial_number <>", value, "serialNumber"); + public Criteria andSourceTypeNotEqualTo(Integer value) { + addCriterion("source_type <>", value, "sourceType"); return (Criteria) this; } - public Criteria andSerialNumberGreaterThan(String value) { - addCriterion("serial_number >", value, "serialNumber"); + public Criteria andSourceTypeGreaterThan(Integer value) { + addCriterion("source_type >", value, "sourceType"); return (Criteria) this; } - public Criteria andSerialNumberGreaterThanOrEqualTo(String value) { - addCriterion("serial_number >=", value, "serialNumber"); + public Criteria andSourceTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("source_type >=", value, "sourceType"); return (Criteria) this; } - public Criteria andSerialNumberLessThan(String value) { - addCriterion("serial_number <", value, "serialNumber"); + public Criteria andSourceTypeLessThan(Integer value) { + addCriterion("source_type <", value, "sourceType"); return (Criteria) this; } - public Criteria andSerialNumberLessThanOrEqualTo(String value) { - addCriterion("serial_number <=", value, "serialNumber"); + public Criteria andSourceTypeLessThanOrEqualTo(Integer value) { + addCriterion("source_type <=", value, "sourceType"); return (Criteria) this; } - public Criteria andSerialNumberLike(String value) { - addCriterion("serial_number like", value, "serialNumber"); + public Criteria andSourceTypeIn(List values) { + addCriterion("source_type in", values, "sourceType"); return (Criteria) this; } - public Criteria andSerialNumberNotLike(String value) { - addCriterion("serial_number not like", value, "serialNumber"); + public Criteria andSourceTypeNotIn(List values) { + addCriterion("source_type not in", values, "sourceType"); return (Criteria) this; } - public Criteria andSerialNumberIn(List values) { - addCriterion("serial_number in", values, "serialNumber"); + public Criteria andSourceTypeBetween(Integer value1, Integer value2) { + addCriterion("source_type between", value1, value2, "sourceType"); return (Criteria) this; } - public Criteria andSerialNumberNotIn(List values) { - addCriterion("serial_number not in", values, "serialNumber"); + public Criteria andSourceTypeNotBetween(Integer value1, Integer value2) { + addCriterion("source_type not between", value1, value2, "sourceType"); return (Criteria) this; } - public Criteria andSerialNumberBetween(String value1, String value2) { - addCriterion("serial_number between", value1, value2, "serialNumber"); + public Criteria andSourceIdIsNull() { + addCriterion("source_id is null"); return (Criteria) this; } - public Criteria andSerialNumberNotBetween(String value1, String value2) { - addCriterion("serial_number not between", value1, value2, "serialNumber"); + public Criteria andSourceIdIsNotNull() { + addCriterion("source_id is not null"); + return (Criteria) this; + } + + public Criteria andSourceIdEqualTo(String value) { + addCriterion("source_id =", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotEqualTo(String value) { + addCriterion("source_id <>", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThan(String value) { + addCriterion("source_id >", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThanOrEqualTo(String value) { + addCriterion("source_id >=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThan(String value) { + addCriterion("source_id <", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThanOrEqualTo(String value) { + addCriterion("source_id <=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLike(String value) { + addCriterion("source_id like", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotLike(String value) { + addCriterion("source_id not like", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdIn(List values) { + addCriterion("source_id in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotIn(List values) { + addCriterion("source_id not in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdBetween(String value1, String value2) { + addCriterion("source_id between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotBetween(String value1, String value2) { + addCriterion("source_id not between", value1, value2, "sourceId"); return (Criteria) this; } @@ -315,6 +375,76 @@ public class HighDiscountPackageDeliverExample { return (Criteria) this; } + public Criteria andSerialNumberIsNull() { + addCriterion("serial_number is null"); + return (Criteria) this; + } + + public Criteria andSerialNumberIsNotNull() { + addCriterion("serial_number is not null"); + return (Criteria) this; + } + + public Criteria andSerialNumberEqualTo(String value) { + addCriterion("serial_number =", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotEqualTo(String value) { + addCriterion("serial_number <>", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberGreaterThan(String value) { + addCriterion("serial_number >", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberGreaterThanOrEqualTo(String value) { + addCriterion("serial_number >=", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLessThan(String value) { + addCriterion("serial_number <", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLessThanOrEqualTo(String value) { + addCriterion("serial_number <=", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberLike(String value) { + addCriterion("serial_number like", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotLike(String value) { + addCriterion("serial_number not like", value, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberIn(List values) { + addCriterion("serial_number in", values, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotIn(List values) { + addCriterion("serial_number not in", values, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberBetween(String value1, String value2) { + addCriterion("serial_number between", value1, value2, "serialNumber"); + return (Criteria) this; + } + + public Criteria andSerialNumberNotBetween(String value1, String value2) { + addCriterion("serial_number not between", value1, value2, "serialNumber"); + return (Criteria) this; + } + public Criteria andPackageNameIsNull() { addCriterion("package_name is null"); return (Criteria) this;