From 33d89c0eb4b72f1d3fa2abc4db24ee981daa5b2c Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 18 Apr 2023 16:48:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hai/dao/GoodsOrderMapper.java | 133 ++ .../java/com/hai/dao/GoodsOrderMapperExt.java | 7 + .../com/hai/dao/GoodsOrderSqlProvider.java | 360 ++++++ .../com/hai/dao/GoodsPresentRecordMapper.java | 23 +- .../dao/GoodsPresentRecordSqlProvider.java | 14 + .../main/java/com/hai/entity/GoodsOrder.java | 273 ++++ .../com/hai/entity/GoodsOrderExample.java | 1133 +++++++++++++++++ .../com/hai/entity/GoodsPresentRecord.java | 16 + .../hai/entity/GoodsPresentRecordExample.java | 60 + 9 files changed, 2009 insertions(+), 10 deletions(-) create mode 100644 hai-service/src/main/java/com/hai/dao/GoodsOrderMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/GoodsOrderMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/GoodsOrderSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/entity/GoodsOrder.java create mode 100644 hai-service/src/main/java/com/hai/entity/GoodsOrderExample.java diff --git a/hai-service/src/main/java/com/hai/dao/GoodsOrderMapper.java b/hai-service/src/main/java/com/hai/dao/GoodsOrderMapper.java new file mode 100644 index 00000000..b3479205 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/GoodsOrderMapper.java @@ -0,0 +1,133 @@ +package com.hai.dao; + +import com.hai.entity.GoodsOrder; +import com.hai.entity.GoodsOrderExample; +import java.util.List; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Options; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Result; +import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.springframework.stereotype.Repository; + +/** + * + * 代码由工具生成,请勿修改!!! + * 如果需要扩展请在其父类进行扩展 + * + **/ +@Repository +public interface GoodsOrderMapper extends GoodsOrderMapperExt { + @SelectProvider(type=GoodsOrderSqlProvider.class, method="countByExample") + long countByExample(GoodsOrderExample example); + + @DeleteProvider(type=GoodsOrderSqlProvider.class, method="deleteByExample") + int deleteByExample(GoodsOrderExample example); + + @Delete({ + "delete from goods_order", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into goods_order (logistics_no, sku_id, ", + "order_id, child_order_id, ", + "delivery_address_id, create_time, ", + "update_time, op_id, ", + "op_name, `status`, ", + "ext_1, ext_2, ext_3)", + "values (#{logisticsNo,jdbcType=VARCHAR}, #{skuId,jdbcType=VARCHAR}, ", + "#{orderId,jdbcType=BIGINT}, #{childOrderId,jdbcType=BIGINT}, ", + "#{deliveryAddressId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", + "#{opName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(GoodsOrder record); + + @InsertProvider(type=GoodsOrderSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(GoodsOrder record); + + @SelectProvider(type=GoodsOrderSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="logistics_no", property="logisticsNo", jdbcType=JdbcType.VARCHAR), + @Result(column="sku_id", property="skuId", jdbcType=JdbcType.VARCHAR), + @Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), + @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), + @Result(column="delivery_address_id", property="deliveryAddressId", jdbcType=JdbcType.BIGINT), + @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), + @Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(GoodsOrderExample example); + + @Select({ + "select", + "id, logistics_no, sku_id, order_id, child_order_id, delivery_address_id, create_time, ", + "update_time, op_id, op_name, `status`, ext_1, ext_2, ext_3", + "from goods_order", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="logistics_no", property="logisticsNo", jdbcType=JdbcType.VARCHAR), + @Result(column="sku_id", property="skuId", jdbcType=JdbcType.VARCHAR), + @Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), + @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), + @Result(column="delivery_address_id", property="deliveryAddressId", jdbcType=JdbcType.BIGINT), + @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), + @Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + GoodsOrder selectByPrimaryKey(Long id); + + @UpdateProvider(type=GoodsOrderSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") GoodsOrder record, @Param("example") GoodsOrderExample example); + + @UpdateProvider(type=GoodsOrderSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") GoodsOrder record, @Param("example") GoodsOrderExample example); + + @UpdateProvider(type=GoodsOrderSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(GoodsOrder record); + + @Update({ + "update goods_order", + "set logistics_no = #{logisticsNo,jdbcType=VARCHAR},", + "sku_id = #{skuId,jdbcType=VARCHAR},", + "order_id = #{orderId,jdbcType=BIGINT},", + "child_order_id = #{childOrderId,jdbcType=BIGINT},", + "delivery_address_id = #{deliveryAddressId,jdbcType=BIGINT},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "op_id = #{opId,jdbcType=BIGINT},", + "op_name = #{opName,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(GoodsOrder record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/GoodsOrderMapperExt.java b/hai-service/src/main/java/com/hai/dao/GoodsOrderMapperExt.java new file mode 100644 index 00000000..72a48fc6 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/GoodsOrderMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface GoodsOrderMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/GoodsOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/GoodsOrderSqlProvider.java new file mode 100644 index 00000000..c8d68975 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/GoodsOrderSqlProvider.java @@ -0,0 +1,360 @@ +package com.hai.dao; + +import com.hai.entity.GoodsOrder; +import com.hai.entity.GoodsOrderExample.Criteria; +import com.hai.entity.GoodsOrderExample.Criterion; +import com.hai.entity.GoodsOrderExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class GoodsOrderSqlProvider { + + public String countByExample(GoodsOrderExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("goods_order"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(GoodsOrderExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("goods_order"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(GoodsOrder record) { + SQL sql = new SQL(); + sql.INSERT_INTO("goods_order"); + + if (record.getLogisticsNo() != null) { + sql.VALUES("logistics_no", "#{logisticsNo,jdbcType=VARCHAR}"); + } + + if (record.getSkuId() != null) { + sql.VALUES("sku_id", "#{skuId,jdbcType=VARCHAR}"); + } + + if (record.getOrderId() != null) { + sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}"); + } + + if (record.getChildOrderId() != null) { + sql.VALUES("child_order_id", "#{childOrderId,jdbcType=BIGINT}"); + } + + if (record.getDeliveryAddressId() != null) { + sql.VALUES("delivery_address_id", "#{deliveryAddressId,jdbcType=BIGINT}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOpId() != null) { + sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.VALUES("op_name", "#{opName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=VARCHAR}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(GoodsOrderExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("logistics_no"); + sql.SELECT("sku_id"); + sql.SELECT("order_id"); + sql.SELECT("child_order_id"); + sql.SELECT("delivery_address_id"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("op_id"); + sql.SELECT("op_name"); + sql.SELECT("`status`"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("goods_order"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + GoodsOrder record = (GoodsOrder) parameter.get("record"); + GoodsOrderExample example = (GoodsOrderExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("goods_order"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getLogisticsNo() != null) { + sql.SET("logistics_no = #{record.logisticsNo,jdbcType=VARCHAR}"); + } + + if (record.getSkuId() != null) { + sql.SET("sku_id = #{record.skuId,jdbcType=VARCHAR}"); + } + + if (record.getOrderId() != null) { + sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); + } + + if (record.getChildOrderId() != null) { + sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}"); + } + + if (record.getDeliveryAddressId() != null) { + sql.SET("delivery_address_id = #{record.deliveryAddressId,jdbcType=BIGINT}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOpId() != null) { + sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=VARCHAR}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("goods_order"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("logistics_no = #{record.logisticsNo,jdbcType=VARCHAR}"); + sql.SET("sku_id = #{record.skuId,jdbcType=VARCHAR}"); + sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); + sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}"); + sql.SET("delivery_address_id = #{record.deliveryAddressId,jdbcType=BIGINT}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); + sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=VARCHAR}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + GoodsOrderExample example = (GoodsOrderExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(GoodsOrder record) { + SQL sql = new SQL(); + sql.UPDATE("goods_order"); + + if (record.getLogisticsNo() != null) { + sql.SET("logistics_no = #{logisticsNo,jdbcType=VARCHAR}"); + } + + if (record.getSkuId() != null) { + sql.SET("sku_id = #{skuId,jdbcType=VARCHAR}"); + } + + if (record.getOrderId() != null) { + sql.SET("order_id = #{orderId,jdbcType=BIGINT}"); + } + + if (record.getChildOrderId() != null) { + sql.SET("child_order_id = #{childOrderId,jdbcType=BIGINT}"); + } + + if (record.getDeliveryAddressId() != null) { + sql.SET("delivery_address_id = #{deliveryAddressId,jdbcType=BIGINT}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOpId() != null) { + sql.SET("op_id = #{opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.SET("op_name = #{opName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=VARCHAR}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, GoodsOrderExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/GoodsPresentRecordMapper.java b/hai-service/src/main/java/com/hai/dao/GoodsPresentRecordMapper.java index efece8a2..9506f316 100644 --- a/hai-service/src/main/java/com/hai/dao/GoodsPresentRecordMapper.java +++ b/hai-service/src/main/java/com/hai/dao/GoodsPresentRecordMapper.java @@ -40,16 +40,16 @@ public interface GoodsPresentRecordMapper extends GoodsPresentRecordMapperExt { @Insert({ "insert into goods_present_record (present_id, order_no, ", - "order_id, `type`, source_id, ", - "num, create_time, ", - "update_time, op_id, ", - "op_name, `status`, ", + "order_id, child_order_id, ", + "`type`, source_id, num, ", + "create_time, update_time, ", + "op_id, op_name, `status`, ", "ext_1, ext_2, ext_3)", "values (#{presentId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ", - "#{orderId,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, #{sourceId,jdbcType=BIGINT}, ", - "#{num,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", - "#{updateTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", - "#{opName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, ", + "#{orderId,jdbcType=BIGINT}, #{childOrderId,jdbcType=BIGINT}, ", + "#{type,jdbcType=INTEGER}, #{sourceId,jdbcType=BIGINT}, #{num,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") @@ -65,6 +65,7 @@ public interface GoodsPresentRecordMapper extends GoodsPresentRecordMapperExt { @Result(column="present_id", property="presentId", jdbcType=JdbcType.BIGINT), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), + @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), @Result(column="num", property="num", jdbcType=JdbcType.INTEGER), @@ -81,8 +82,8 @@ public interface GoodsPresentRecordMapper extends GoodsPresentRecordMapperExt { @Select({ "select", - "id, present_id, order_no, order_id, `type`, source_id, num, create_time, update_time, ", - "op_id, op_name, `status`, ext_1, ext_2, ext_3", + "id, present_id, order_no, order_id, child_order_id, `type`, source_id, num, ", + "create_time, update_time, op_id, op_name, `status`, ext_1, ext_2, ext_3", "from goods_present_record", "where id = #{id,jdbcType=BIGINT}" }) @@ -91,6 +92,7 @@ public interface GoodsPresentRecordMapper extends GoodsPresentRecordMapperExt { @Result(column="present_id", property="presentId", jdbcType=JdbcType.BIGINT), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), + @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), @Result(column="num", property="num", jdbcType=JdbcType.INTEGER), @@ -119,6 +121,7 @@ public interface GoodsPresentRecordMapper extends GoodsPresentRecordMapperExt { "set present_id = #{presentId,jdbcType=BIGINT},", "order_no = #{orderNo,jdbcType=VARCHAR},", "order_id = #{orderId,jdbcType=BIGINT},", + "child_order_id = #{childOrderId,jdbcType=BIGINT},", "`type` = #{type,jdbcType=INTEGER},", "source_id = #{sourceId,jdbcType=BIGINT},", "num = #{num,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/GoodsPresentRecordSqlProvider.java b/hai-service/src/main/java/com/hai/dao/GoodsPresentRecordSqlProvider.java index 735a5b04..b25c706c 100644 --- a/hai-service/src/main/java/com/hai/dao/GoodsPresentRecordSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/GoodsPresentRecordSqlProvider.java @@ -40,6 +40,10 @@ public class GoodsPresentRecordSqlProvider { sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}"); } + if (record.getChildOrderId() != null) { + sql.VALUES("child_order_id", "#{childOrderId,jdbcType=BIGINT}"); + } + if (record.getType() != null) { sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); } @@ -97,6 +101,7 @@ public class GoodsPresentRecordSqlProvider { sql.SELECT("present_id"); sql.SELECT("order_no"); sql.SELECT("order_id"); + sql.SELECT("child_order_id"); sql.SELECT("`type`"); sql.SELECT("source_id"); sql.SELECT("num"); @@ -141,6 +146,10 @@ public class GoodsPresentRecordSqlProvider { sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); } + if (record.getChildOrderId() != null) { + sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}"); + } + if (record.getType() != null) { sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); } @@ -197,6 +206,7 @@ public class GoodsPresentRecordSqlProvider { sql.SET("present_id = #{record.presentId,jdbcType=BIGINT}"); sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); + sql.SET("child_order_id = #{record.childOrderId,jdbcType=BIGINT}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); sql.SET("num = #{record.num,jdbcType=INTEGER}"); @@ -230,6 +240,10 @@ public class GoodsPresentRecordSqlProvider { sql.SET("order_id = #{orderId,jdbcType=BIGINT}"); } + if (record.getChildOrderId() != null) { + sql.SET("child_order_id = #{childOrderId,jdbcType=BIGINT}"); + } + if (record.getType() != null) { sql.SET("`type` = #{type,jdbcType=INTEGER}"); } diff --git a/hai-service/src/main/java/com/hai/entity/GoodsOrder.java b/hai-service/src/main/java/com/hai/entity/GoodsOrder.java new file mode 100644 index 00000000..eeb4ccf5 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/GoodsOrder.java @@ -0,0 +1,273 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * goods_order + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class GoodsOrder implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 物流号 + */ + private String logisticsNo; + + /** + * 规格编码 + */ + private String skuId; + + /** + * 订单编码 + */ + private Long orderId; + + /** + * 子订单编码 + */ + private Long childOrderId; + + /** + * 收货地址编码 + */ + private Long deliveryAddressId; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 操作人员id + */ + private Long opId; + + /** + * 操作人员名称 + */ + private String opName; + + /** + * 1 正常 2: 删除 + */ + private String status; + + /** + * ext_1 + */ + private String ext1; + + /** + * ext_2 + */ + private String ext2; + + /** + * ext_3 + */ + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getLogisticsNo() { + return logisticsNo; + } + + public void setLogisticsNo(String logisticsNo) { + this.logisticsNo = logisticsNo; + } + + public String getSkuId() { + return skuId; + } + + public void setSkuId(String skuId) { + this.skuId = skuId; + } + + public Long getOrderId() { + return orderId; + } + + public void setOrderId(Long orderId) { + this.orderId = orderId; + } + + public Long getChildOrderId() { + return childOrderId; + } + + public void setChildOrderId(Long childOrderId) { + this.childOrderId = childOrderId; + } + + public Long getDeliveryAddressId() { + return deliveryAddressId; + } + + public void setDeliveryAddressId(Long deliveryAddressId) { + this.deliveryAddressId = deliveryAddressId; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Long getOpId() { + return opId; + } + + public void setOpId(Long opId) { + this.opId = opId; + } + + public String getOpName() { + return opName; + } + + public void setOpName(String opName) { + this.opName = opName; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + GoodsOrder other = (GoodsOrder) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getLogisticsNo() == null ? other.getLogisticsNo() == null : this.getLogisticsNo().equals(other.getLogisticsNo())) + && (this.getSkuId() == null ? other.getSkuId() == null : this.getSkuId().equals(other.getSkuId())) + && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) + && (this.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId())) + && (this.getDeliveryAddressId() == null ? other.getDeliveryAddressId() == null : this.getDeliveryAddressId().equals(other.getDeliveryAddressId())) + && (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())) + && (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName())) + && (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())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getLogisticsNo() == null) ? 0 : getLogisticsNo().hashCode()); + result = prime * result + ((getSkuId() == null) ? 0 : getSkuId().hashCode()); + result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); + result = prime * result + ((getChildOrderId() == null) ? 0 : getChildOrderId().hashCode()); + result = prime * result + ((getDeliveryAddressId() == null) ? 0 : getDeliveryAddressId().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()); + result = prime * result + ((getOpName() == null) ? 0 : getOpName().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()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", logisticsNo=").append(logisticsNo); + sb.append(", skuId=").append(skuId); + sb.append(", orderId=").append(orderId); + sb.append(", childOrderId=").append(childOrderId); + sb.append(", deliveryAddressId=").append(deliveryAddressId); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", opId=").append(opId); + sb.append(", opName=").append(opName); + sb.append(", status=").append(status); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/GoodsOrderExample.java b/hai-service/src/main/java/com/hai/entity/GoodsOrderExample.java new file mode 100644 index 00000000..628ed052 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/GoodsOrderExample.java @@ -0,0 +1,1133 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GoodsOrderExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public GoodsOrderExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andLogisticsNoIsNull() { + addCriterion("logistics_no is null"); + return (Criteria) this; + } + + public Criteria andLogisticsNoIsNotNull() { + addCriterion("logistics_no is not null"); + return (Criteria) this; + } + + public Criteria andLogisticsNoEqualTo(String value) { + addCriterion("logistics_no =", value, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andLogisticsNoNotEqualTo(String value) { + addCriterion("logistics_no <>", value, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andLogisticsNoGreaterThan(String value) { + addCriterion("logistics_no >", value, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andLogisticsNoGreaterThanOrEqualTo(String value) { + addCriterion("logistics_no >=", value, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andLogisticsNoLessThan(String value) { + addCriterion("logistics_no <", value, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andLogisticsNoLessThanOrEqualTo(String value) { + addCriterion("logistics_no <=", value, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andLogisticsNoLike(String value) { + addCriterion("logistics_no like", value, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andLogisticsNoNotLike(String value) { + addCriterion("logistics_no not like", value, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andLogisticsNoIn(List values) { + addCriterion("logistics_no in", values, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andLogisticsNoNotIn(List values) { + addCriterion("logistics_no not in", values, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andLogisticsNoBetween(String value1, String value2) { + addCriterion("logistics_no between", value1, value2, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andLogisticsNoNotBetween(String value1, String value2) { + addCriterion("logistics_no not between", value1, value2, "logisticsNo"); + return (Criteria) this; + } + + public Criteria andSkuIdIsNull() { + addCriterion("sku_id is null"); + return (Criteria) this; + } + + public Criteria andSkuIdIsNotNull() { + addCriterion("sku_id is not null"); + return (Criteria) this; + } + + public Criteria andSkuIdEqualTo(String value) { + addCriterion("sku_id =", value, "skuId"); + return (Criteria) this; + } + + public Criteria andSkuIdNotEqualTo(String value) { + addCriterion("sku_id <>", value, "skuId"); + return (Criteria) this; + } + + public Criteria andSkuIdGreaterThan(String value) { + addCriterion("sku_id >", value, "skuId"); + return (Criteria) this; + } + + public Criteria andSkuIdGreaterThanOrEqualTo(String value) { + addCriterion("sku_id >=", value, "skuId"); + return (Criteria) this; + } + + public Criteria andSkuIdLessThan(String value) { + addCriterion("sku_id <", value, "skuId"); + return (Criteria) this; + } + + public Criteria andSkuIdLessThanOrEqualTo(String value) { + addCriterion("sku_id <=", value, "skuId"); + return (Criteria) this; + } + + public Criteria andSkuIdLike(String value) { + addCriterion("sku_id like", value, "skuId"); + return (Criteria) this; + } + + public Criteria andSkuIdNotLike(String value) { + addCriterion("sku_id not like", value, "skuId"); + return (Criteria) this; + } + + public Criteria andSkuIdIn(List values) { + addCriterion("sku_id in", values, "skuId"); + return (Criteria) this; + } + + public Criteria andSkuIdNotIn(List values) { + addCriterion("sku_id not in", values, "skuId"); + return (Criteria) this; + } + + public Criteria andSkuIdBetween(String value1, String value2) { + addCriterion("sku_id between", value1, value2, "skuId"); + return (Criteria) this; + } + + public Criteria andSkuIdNotBetween(String value1, String value2) { + addCriterion("sku_id not between", value1, value2, "skuId"); + return (Criteria) this; + } + + public Criteria andOrderIdIsNull() { + addCriterion("order_id is null"); + return (Criteria) this; + } + + public Criteria andOrderIdIsNotNull() { + addCriterion("order_id is not null"); + return (Criteria) this; + } + + public Criteria andOrderIdEqualTo(Long value) { + addCriterion("order_id =", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdNotEqualTo(Long value) { + addCriterion("order_id <>", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdGreaterThan(Long value) { + addCriterion("order_id >", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdGreaterThanOrEqualTo(Long value) { + addCriterion("order_id >=", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdLessThan(Long value) { + addCriterion("order_id <", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdLessThanOrEqualTo(Long value) { + addCriterion("order_id <=", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdIn(List values) { + addCriterion("order_id in", values, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdNotIn(List values) { + addCriterion("order_id not in", values, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdBetween(Long value1, Long value2) { + addCriterion("order_id between", value1, value2, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdNotBetween(Long value1, Long value2) { + addCriterion("order_id not between", value1, value2, "orderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdIsNull() { + addCriterion("child_order_id is null"); + return (Criteria) this; + } + + public Criteria andChildOrderIdIsNotNull() { + addCriterion("child_order_id is not null"); + return (Criteria) this; + } + + public Criteria andChildOrderIdEqualTo(Long value) { + addCriterion("child_order_id =", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdNotEqualTo(Long value) { + addCriterion("child_order_id <>", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdGreaterThan(Long value) { + addCriterion("child_order_id >", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdGreaterThanOrEqualTo(Long value) { + addCriterion("child_order_id >=", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdLessThan(Long value) { + addCriterion("child_order_id <", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdLessThanOrEqualTo(Long value) { + addCriterion("child_order_id <=", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdIn(List values) { + addCriterion("child_order_id in", values, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdNotIn(List values) { + addCriterion("child_order_id not in", values, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdBetween(Long value1, Long value2) { + addCriterion("child_order_id between", value1, value2, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdNotBetween(Long value1, Long value2) { + addCriterion("child_order_id not between", value1, value2, "childOrderId"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdIsNull() { + addCriterion("delivery_address_id is null"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdIsNotNull() { + addCriterion("delivery_address_id is not null"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdEqualTo(Long value) { + addCriterion("delivery_address_id =", value, "deliveryAddressId"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdNotEqualTo(Long value) { + addCriterion("delivery_address_id <>", value, "deliveryAddressId"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdGreaterThan(Long value) { + addCriterion("delivery_address_id >", value, "deliveryAddressId"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdGreaterThanOrEqualTo(Long value) { + addCriterion("delivery_address_id >=", value, "deliveryAddressId"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdLessThan(Long value) { + addCriterion("delivery_address_id <", value, "deliveryAddressId"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdLessThanOrEqualTo(Long value) { + addCriterion("delivery_address_id <=", value, "deliveryAddressId"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdIn(List values) { + addCriterion("delivery_address_id in", values, "deliveryAddressId"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdNotIn(List values) { + addCriterion("delivery_address_id not in", values, "deliveryAddressId"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdBetween(Long value1, Long value2) { + addCriterion("delivery_address_id between", value1, value2, "deliveryAddressId"); + return (Criteria) this; + } + + public Criteria andDeliveryAddressIdNotBetween(Long value1, Long value2) { + addCriterion("delivery_address_id not between", value1, value2, "deliveryAddressId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andOpIdIsNull() { + addCriterion("op_id is null"); + return (Criteria) this; + } + + public Criteria andOpIdIsNotNull() { + addCriterion("op_id is not null"); + return (Criteria) this; + } + + public Criteria andOpIdEqualTo(Long value) { + addCriterion("op_id =", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotEqualTo(Long value) { + addCriterion("op_id <>", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThan(Long value) { + addCriterion("op_id >", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThanOrEqualTo(Long value) { + addCriterion("op_id >=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThan(Long value) { + addCriterion("op_id <", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThanOrEqualTo(Long value) { + addCriterion("op_id <=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdIn(List values) { + addCriterion("op_id in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotIn(List values) { + addCriterion("op_id not in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdBetween(Long value1, Long value2) { + addCriterion("op_id between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotBetween(Long value1, Long value2) { + addCriterion("op_id not between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpNameIsNull() { + addCriterion("op_name is null"); + return (Criteria) this; + } + + public Criteria andOpNameIsNotNull() { + addCriterion("op_name is not null"); + return (Criteria) this; + } + + public Criteria andOpNameEqualTo(String value) { + addCriterion("op_name =", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotEqualTo(String value) { + addCriterion("op_name <>", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThan(String value) { + addCriterion("op_name >", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThanOrEqualTo(String value) { + addCriterion("op_name >=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThan(String value) { + addCriterion("op_name <", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThanOrEqualTo(String value) { + addCriterion("op_name <=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLike(String value) { + addCriterion("op_name like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotLike(String value) { + addCriterion("op_name not like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameIn(List values) { + addCriterion("op_name in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotIn(List values) { + addCriterion("op_name not in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameBetween(String value1, String value2) { + addCriterion("op_name between", value1, value2, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotBetween(String value1, String value2) { + addCriterion("op_name not between", value1, value2, "opName"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/GoodsPresentRecord.java b/hai-service/src/main/java/com/hai/entity/GoodsPresentRecord.java index 90856287..d293843f 100644 --- a/hai-service/src/main/java/com/hai/entity/GoodsPresentRecord.java +++ b/hai-service/src/main/java/com/hai/entity/GoodsPresentRecord.java @@ -33,6 +33,11 @@ public class GoodsPresentRecord implements Serializable { */ private Long orderId; + /** + * 子订单号 + */ + private Long childOrderId; + /** * 1:卡券 2:优惠券 */ @@ -122,6 +127,14 @@ public class GoodsPresentRecord implements Serializable { this.orderId = orderId; } + public Long getChildOrderId() { + return childOrderId; + } + + public void setChildOrderId(Long childOrderId) { + this.childOrderId = childOrderId; + } + public Integer getType() { return type; } @@ -226,6 +239,7 @@ public class GoodsPresentRecord implements Serializable { && (this.getPresentId() == null ? other.getPresentId() == null : this.getPresentId().equals(other.getPresentId())) && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) + && (this.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId())) && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum())) @@ -247,6 +261,7 @@ public class GoodsPresentRecord implements Serializable { result = prime * result + ((getPresentId() == null) ? 0 : getPresentId().hashCode()); result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); + result = prime * result + ((getChildOrderId() == null) ? 0 : getChildOrderId().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode()); result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode()); @@ -271,6 +286,7 @@ public class GoodsPresentRecord implements Serializable { sb.append(", presentId=").append(presentId); sb.append(", orderNo=").append(orderNo); sb.append(", orderId=").append(orderId); + sb.append(", childOrderId=").append(childOrderId); sb.append(", type=").append(type); sb.append(", sourceId=").append(sourceId); sb.append(", num=").append(num); diff --git a/hai-service/src/main/java/com/hai/entity/GoodsPresentRecordExample.java b/hai-service/src/main/java/com/hai/entity/GoodsPresentRecordExample.java index dde1560f..535eec05 100644 --- a/hai-service/src/main/java/com/hai/entity/GoodsPresentRecordExample.java +++ b/hai-service/src/main/java/com/hai/entity/GoodsPresentRecordExample.java @@ -375,6 +375,66 @@ public class GoodsPresentRecordExample { return (Criteria) this; } + public Criteria andChildOrderIdIsNull() { + addCriterion("child_order_id is null"); + return (Criteria) this; + } + + public Criteria andChildOrderIdIsNotNull() { + addCriterion("child_order_id is not null"); + return (Criteria) this; + } + + public Criteria andChildOrderIdEqualTo(Long value) { + addCriterion("child_order_id =", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdNotEqualTo(Long value) { + addCriterion("child_order_id <>", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdGreaterThan(Long value) { + addCriterion("child_order_id >", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdGreaterThanOrEqualTo(Long value) { + addCriterion("child_order_id >=", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdLessThan(Long value) { + addCriterion("child_order_id <", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdLessThanOrEqualTo(Long value) { + addCriterion("child_order_id <=", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdIn(List values) { + addCriterion("child_order_id in", values, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdNotIn(List values) { + addCriterion("child_order_id not in", values, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdBetween(Long value1, Long value2) { + addCriterion("child_order_id between", value1, value2, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdNotBetween(Long value1, Long value2) { + addCriterion("child_order_id not between", value1, value2, "childOrderId"); + return (Criteria) this; + } + public Criteria andTypeIsNull() { addCriterion("`type` is null"); return (Criteria) this;