提交代码

new-dev
胡锐 2 years ago
parent 103e51e0ae
commit 25d02c1fdd
  1. 21
      hai-service/src/main/java/com/hai/dao/GoodsPresentRecordMapper.java
  2. 14
      hai-service/src/main/java/com/hai/dao/GoodsPresentRecordSqlProvider.java
  3. 16
      hai-service/src/main/java/com/hai/entity/GoodsPresentRecord.java
  4. 70
      hai-service/src/main/java/com/hai/entity/GoodsPresentRecordExample.java

@ -41,15 +41,17 @@ public interface GoodsPresentRecordMapper extends GoodsPresentRecordMapperExt {
@Insert({ @Insert({
"insert into goods_present_record (present_id, order_no, ", "insert into goods_present_record (present_id, order_no, ",
"order_id, child_order_id, ", "order_id, child_order_id, ",
"`type`, source_id, num, ", "`type`, source_id, source_name, ",
"create_time, update_time, ", "num, create_time, ",
"op_id, op_name, `status`, ", "update_time, op_id, ",
"op_name, `status`, ",
"ext_1, ext_2, ext_3)", "ext_1, ext_2, ext_3)",
"values (#{presentId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ", "values (#{presentId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
"#{orderId,jdbcType=BIGINT}, #{childOrderId,jdbcType=BIGINT}, ", "#{orderId,jdbcType=BIGINT}, #{childOrderId,jdbcType=BIGINT}, ",
"#{type,jdbcType=INTEGER}, #{sourceId,jdbcType=BIGINT}, #{num,jdbcType=INTEGER}, ", "#{type,jdbcType=INTEGER}, #{sourceId,jdbcType=BIGINT}, #{sourceName,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", "#{num,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, ", "#{updateTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ",
"#{opName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
@ -68,6 +70,7 @@ public interface GoodsPresentRecordMapper extends GoodsPresentRecordMapperExt {
@Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), @Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT),
@Result(column="source_name", property="sourceName", jdbcType=JdbcType.VARCHAR),
@Result(column="num", property="num", jdbcType=JdbcType.INTEGER), @Result(column="num", property="num", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@ -82,8 +85,8 @@ public interface GoodsPresentRecordMapper extends GoodsPresentRecordMapperExt {
@Select({ @Select({
"select", "select",
"id, present_id, order_no, order_id, child_order_id, `type`, source_id, num, ", "id, present_id, order_no, order_id, child_order_id, `type`, source_id, source_name, ",
"create_time, update_time, op_id, op_name, `status`, ext_1, ext_2, ext_3", "num, create_time, update_time, op_id, op_name, `status`, ext_1, ext_2, ext_3",
"from goods_present_record", "from goods_present_record",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -95,6 +98,7 @@ public interface GoodsPresentRecordMapper extends GoodsPresentRecordMapperExt {
@Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), @Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT),
@Result(column="source_name", property="sourceName", jdbcType=JdbcType.VARCHAR),
@Result(column="num", property="num", jdbcType=JdbcType.INTEGER), @Result(column="num", property="num", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@ -124,6 +128,7 @@ public interface GoodsPresentRecordMapper extends GoodsPresentRecordMapperExt {
"child_order_id = #{childOrderId,jdbcType=BIGINT},", "child_order_id = #{childOrderId,jdbcType=BIGINT},",
"`type` = #{type,jdbcType=INTEGER},", "`type` = #{type,jdbcType=INTEGER},",
"source_id = #{sourceId,jdbcType=BIGINT},", "source_id = #{sourceId,jdbcType=BIGINT},",
"source_name = #{sourceName,jdbcType=VARCHAR},",
"num = #{num,jdbcType=INTEGER},", "num = #{num,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},", "create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},", "update_time = #{updateTime,jdbcType=TIMESTAMP},",

@ -52,6 +52,10 @@ public class GoodsPresentRecordSqlProvider {
sql.VALUES("source_id", "#{sourceId,jdbcType=BIGINT}"); sql.VALUES("source_id", "#{sourceId,jdbcType=BIGINT}");
} }
if (record.getSourceName() != null) {
sql.VALUES("source_name", "#{sourceName,jdbcType=VARCHAR}");
}
if (record.getNum() != null) { if (record.getNum() != null) {
sql.VALUES("num", "#{num,jdbcType=INTEGER}"); sql.VALUES("num", "#{num,jdbcType=INTEGER}");
} }
@ -104,6 +108,7 @@ public class GoodsPresentRecordSqlProvider {
sql.SELECT("child_order_id"); sql.SELECT("child_order_id");
sql.SELECT("`type`"); sql.SELECT("`type`");
sql.SELECT("source_id"); sql.SELECT("source_id");
sql.SELECT("source_name");
sql.SELECT("num"); sql.SELECT("num");
sql.SELECT("create_time"); sql.SELECT("create_time");
sql.SELECT("update_time"); sql.SELECT("update_time");
@ -158,6 +163,10 @@ public class GoodsPresentRecordSqlProvider {
sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}");
} }
if (record.getSourceName() != null) {
sql.SET("source_name = #{record.sourceName,jdbcType=VARCHAR}");
}
if (record.getNum() != null) { if (record.getNum() != null) {
sql.SET("num = #{record.num,jdbcType=INTEGER}"); sql.SET("num = #{record.num,jdbcType=INTEGER}");
} }
@ -209,6 +218,7 @@ public class GoodsPresentRecordSqlProvider {
sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}"); sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}");
sql.SET("source_name = #{record.sourceName,jdbcType=VARCHAR}");
sql.SET("num = #{record.num,jdbcType=INTEGER}"); sql.SET("num = #{record.num,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
@ -252,6 +262,10 @@ public class GoodsPresentRecordSqlProvider {
sql.SET("source_id = #{sourceId,jdbcType=BIGINT}"); sql.SET("source_id = #{sourceId,jdbcType=BIGINT}");
} }
if (record.getSourceName() != null) {
sql.SET("source_name = #{sourceName,jdbcType=VARCHAR}");
}
if (record.getNum() != null) { if (record.getNum() != null) {
sql.SET("num = #{num,jdbcType=INTEGER}"); sql.SET("num = #{num,jdbcType=INTEGER}");
} }

@ -48,6 +48,11 @@ public class GoodsPresentRecord implements Serializable {
*/ */
private Long sourceId; private Long sourceId;
/**
* 来源名称
*/
private String sourceName;
/** /**
* 赠送数量 * 赠送数量
*/ */
@ -151,6 +156,14 @@ public class GoodsPresentRecord implements Serializable {
this.sourceId = sourceId; this.sourceId = sourceId;
} }
public String getSourceName() {
return sourceName;
}
public void setSourceName(String sourceName) {
this.sourceName = sourceName;
}
public Integer getNum() { public Integer getNum() {
return num; return num;
} }
@ -242,6 +255,7 @@ public class GoodsPresentRecord implements Serializable {
&& (this.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId())) && (this.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId())) && (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId()))
&& (this.getSourceName() == null ? other.getSourceName() == null : this.getSourceName().equals(other.getSourceName()))
&& (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum())) && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
@ -264,6 +278,7 @@ public class GoodsPresentRecord implements Serializable {
result = prime * result + ((getChildOrderId() == null) ? 0 : getChildOrderId().hashCode()); result = prime * result + ((getChildOrderId() == null) ? 0 : getChildOrderId().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode()); result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode());
result = prime * result + ((getSourceName() == null) ? 0 : getSourceName().hashCode());
result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode()); result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
@ -289,6 +304,7 @@ public class GoodsPresentRecord implements Serializable {
sb.append(", childOrderId=").append(childOrderId); sb.append(", childOrderId=").append(childOrderId);
sb.append(", type=").append(type); sb.append(", type=").append(type);
sb.append(", sourceId=").append(sourceId); sb.append(", sourceId=").append(sourceId);
sb.append(", sourceName=").append(sourceName);
sb.append(", num=").append(num); sb.append(", num=").append(num);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime); sb.append(", updateTime=").append(updateTime);

@ -555,6 +555,76 @@ public class GoodsPresentRecordExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andSourceNameIsNull() {
addCriterion("source_name is null");
return (Criteria) this;
}
public Criteria andSourceNameIsNotNull() {
addCriterion("source_name is not null");
return (Criteria) this;
}
public Criteria andSourceNameEqualTo(String value) {
addCriterion("source_name =", value, "sourceName");
return (Criteria) this;
}
public Criteria andSourceNameNotEqualTo(String value) {
addCriterion("source_name <>", value, "sourceName");
return (Criteria) this;
}
public Criteria andSourceNameGreaterThan(String value) {
addCriterion("source_name >", value, "sourceName");
return (Criteria) this;
}
public Criteria andSourceNameGreaterThanOrEqualTo(String value) {
addCriterion("source_name >=", value, "sourceName");
return (Criteria) this;
}
public Criteria andSourceNameLessThan(String value) {
addCriterion("source_name <", value, "sourceName");
return (Criteria) this;
}
public Criteria andSourceNameLessThanOrEqualTo(String value) {
addCriterion("source_name <=", value, "sourceName");
return (Criteria) this;
}
public Criteria andSourceNameLike(String value) {
addCriterion("source_name like", value, "sourceName");
return (Criteria) this;
}
public Criteria andSourceNameNotLike(String value) {
addCriterion("source_name not like", value, "sourceName");
return (Criteria) this;
}
public Criteria andSourceNameIn(List<String> values) {
addCriterion("source_name in", values, "sourceName");
return (Criteria) this;
}
public Criteria andSourceNameNotIn(List<String> values) {
addCriterion("source_name not in", values, "sourceName");
return (Criteria) this;
}
public Criteria andSourceNameBetween(String value1, String value2) {
addCriterion("source_name between", value1, value2, "sourceName");
return (Criteria) this;
}
public Criteria andSourceNameNotBetween(String value1, String value2) {
addCriterion("source_name not between", value1, value2, "sourceName");
return (Criteria) this;
}
public Criteria andNumIsNull() { public Criteria andNumIsNull() {
addCriterion("num is null"); addCriterion("num is null");
return (Criteria) this; return (Criteria) this;

Loading…
Cancel
Save