diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java index f6c92d21..b0c63902 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -137,6 +137,7 @@ public class HighOrderController { highOrder.setOrderNo("HF" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5)); highOrder.setMemId(userInfoModel.getHighUser().getId()); highOrder.setMemName(userInfoModel.getHighUser().getName()); + highOrder.setMemPhone(userInfoModel.getHighUser().getPhone()); highOrder.setTotalPrice(totalPrice); highOrder.setPayPrice(totalPrice); highOrder.setCreateTime(new Date()); diff --git a/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java b/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java index a36c9c44..bfd04edd 100644 --- a/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java @@ -40,23 +40,25 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Insert({ "insert into high_order (order_no, mem_id, ", - "mem_name, pay_model, ", - "pay_type, pay_gold, ", - "pay_price, pay_real_price, ", - "pay_serial_no, order_status, ", - "total_price, create_time, ", - "pay_time, cancel_time, ", - "finish_time, remarks, ", - "ext_1, ext_2, ext_3)", + "mem_name, mem_phone, ", + "pay_model, pay_type, ", + "pay_gold, pay_price, ", + "pay_real_price, pay_serial_no, ", + "order_status, total_price, ", + "create_time, pay_time, ", + "cancel_time, finish_time, ", + "remarks, ext_1, ext_2, ", + "ext_3)", "values (#{orderNo,jdbcType=VARCHAR}, #{memId,jdbcType=BIGINT}, ", - "#{memName,jdbcType=VARCHAR}, #{payModel,jdbcType=INTEGER}, ", - "#{payType,jdbcType=INTEGER}, #{payGold,jdbcType=INTEGER}, ", - "#{payPrice,jdbcType=DECIMAL}, #{payRealPrice,jdbcType=DECIMAL}, ", - "#{paySerialNo,jdbcType=VARCHAR}, #{orderStatus,jdbcType=INTEGER}, ", - "#{totalPrice,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, ", - "#{payTime,jdbcType=TIMESTAMP}, #{cancelTime,jdbcType=TIMESTAMP}, ", - "#{finishTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ", + "#{payModel,jdbcType=INTEGER}, #{payType,jdbcType=INTEGER}, ", + "#{payGold,jdbcType=INTEGER}, #{payPrice,jdbcType=DECIMAL}, ", + "#{payRealPrice,jdbcType=DECIMAL}, #{paySerialNo,jdbcType=VARCHAR}, ", + "#{orderStatus,jdbcType=INTEGER}, #{totalPrice,jdbcType=DECIMAL}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ", + "#{cancelTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ", + "#{remarks,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", + "#{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(HighOrder record); @@ -71,6 +73,7 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR), + @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR), @Result(column="pay_model", property="payModel", jdbcType=JdbcType.INTEGER), @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @@ -92,9 +95,9 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Select({ "select", - "id, order_no, mem_id, mem_name, pay_model, pay_type, pay_gold, pay_price, pay_real_price, ", - "pay_serial_no, order_status, total_price, create_time, pay_time, cancel_time, ", - "finish_time, remarks, ext_1, ext_2, ext_3", + "id, order_no, mem_id, mem_name, mem_phone, pay_model, pay_type, pay_gold, pay_price, ", + "pay_real_price, pay_serial_no, order_status, total_price, create_time, pay_time, ", + "cancel_time, finish_time, remarks, ext_1, ext_2, ext_3", "from high_order", "where id = #{id,jdbcType=BIGINT}" }) @@ -103,6 +106,7 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR), + @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR), @Result(column="pay_model", property="payModel", jdbcType=JdbcType.INTEGER), @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @@ -136,6 +140,7 @@ public interface HighOrderMapper extends HighOrderMapperExt { "set order_no = #{orderNo,jdbcType=VARCHAR},", "mem_id = #{memId,jdbcType=BIGINT},", "mem_name = #{memName,jdbcType=VARCHAR},", + "mem_phone = #{memPhone,jdbcType=VARCHAR},", "pay_model = #{payModel,jdbcType=INTEGER},", "pay_type = #{payType,jdbcType=INTEGER},", "pay_gold = #{payGold,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java index c18f2885..44792d07 100644 --- a/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java @@ -40,6 +40,10 @@ public class HighOrderSqlProvider { sql.VALUES("mem_name", "#{memName,jdbcType=VARCHAR}"); } + if (record.getMemPhone() != null) { + sql.VALUES("mem_phone", "#{memPhone,jdbcType=VARCHAR}"); + } + if (record.getPayModel() != null) { sql.VALUES("pay_model", "#{payModel,jdbcType=INTEGER}"); } @@ -117,6 +121,7 @@ public class HighOrderSqlProvider { sql.SELECT("order_no"); sql.SELECT("mem_id"); sql.SELECT("mem_name"); + sql.SELECT("mem_phone"); sql.SELECT("pay_model"); sql.SELECT("pay_type"); sql.SELECT("pay_gold"); @@ -166,6 +171,10 @@ public class HighOrderSqlProvider { sql.SET("mem_name = #{record.memName,jdbcType=VARCHAR}"); } + if (record.getMemPhone() != null) { + sql.SET("mem_phone = #{record.memPhone,jdbcType=VARCHAR}"); + } + if (record.getPayModel() != null) { sql.SET("pay_model = #{record.payModel,jdbcType=INTEGER}"); } @@ -242,6 +251,7 @@ public class HighOrderSqlProvider { sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); sql.SET("mem_id = #{record.memId,jdbcType=BIGINT}"); sql.SET("mem_name = #{record.memName,jdbcType=VARCHAR}"); + sql.SET("mem_phone = #{record.memPhone,jdbcType=VARCHAR}"); sql.SET("pay_model = #{record.payModel,jdbcType=INTEGER}"); sql.SET("pay_type = #{record.payType,jdbcType=INTEGER}"); sql.SET("pay_gold = #{record.payGold,jdbcType=INTEGER}"); @@ -280,6 +290,10 @@ public class HighOrderSqlProvider { sql.SET("mem_name = #{memName,jdbcType=VARCHAR}"); } + if (record.getMemPhone() != null) { + sql.SET("mem_phone = #{memPhone,jdbcType=VARCHAR}"); + } + if (record.getPayModel() != null) { sql.SET("pay_model = #{payModel,jdbcType=INTEGER}"); } diff --git a/hai-service/src/main/java/com/hai/entity/HighChildOrder.java b/hai-service/src/main/java/com/hai/entity/HighChildOrder.java index 97444872..caf47099 100644 --- a/hai-service/src/main/java/com/hai/entity/HighChildOrder.java +++ b/hai-service/src/main/java/com/hai/entity/HighChildOrder.java @@ -2,6 +2,7 @@ package com.hai.entity; import java.io.Serializable; import java.math.BigDecimal; +import java.util.List; /** * high_child_order @@ -293,4 +294,4 @@ public class HighChildOrder implements Serializable { sb.append("]"); return sb.toString(); } -} \ No newline at end of file +} diff --git a/hai-service/src/main/java/com/hai/entity/HighOrder.java b/hai-service/src/main/java/com/hai/entity/HighOrder.java index 558523bb..af2d41d5 100644 --- a/hai-service/src/main/java/com/hai/entity/HighOrder.java +++ b/hai-service/src/main/java/com/hai/entity/HighOrder.java @@ -35,6 +35,11 @@ public class HighOrder implements Serializable { */ private String memName; + /** + * 用户电话 + */ + private String memPhone; + /** * 支付模式:1 金币,2 第三方平台,3 混合 */ @@ -150,6 +155,14 @@ public class HighOrder implements Serializable { this.memName = memName; } + public String getMemPhone() { + return memPhone; + } + + public void setMemPhone(String memPhone) { + this.memPhone = memPhone; + } + public Integer getPayModel() { return payModel; } @@ -294,6 +307,7 @@ public class HighOrder implements Serializable { && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) && (this.getMemId() == null ? other.getMemId() == null : this.getMemId().equals(other.getMemId())) && (this.getMemName() == null ? other.getMemName() == null : this.getMemName().equals(other.getMemName())) + && (this.getMemPhone() == null ? other.getMemPhone() == null : this.getMemPhone().equals(other.getMemPhone())) && (this.getPayModel() == null ? other.getPayModel() == null : this.getPayModel().equals(other.getPayModel())) && (this.getPayType() == null ? other.getPayType() == null : this.getPayType().equals(other.getPayType())) && (this.getPayGold() == null ? other.getPayGold() == null : this.getPayGold().equals(other.getPayGold())) @@ -320,6 +334,7 @@ public class HighOrder implements Serializable { result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); result = prime * result + ((getMemId() == null) ? 0 : getMemId().hashCode()); result = prime * result + ((getMemName() == null) ? 0 : getMemName().hashCode()); + result = prime * result + ((getMemPhone() == null) ? 0 : getMemPhone().hashCode()); result = prime * result + ((getPayModel() == null) ? 0 : getPayModel().hashCode()); result = prime * result + ((getPayType() == null) ? 0 : getPayType().hashCode()); result = prime * result + ((getPayGold() == null) ? 0 : getPayGold().hashCode()); @@ -349,6 +364,7 @@ public class HighOrder implements Serializable { sb.append(", orderNo=").append(orderNo); sb.append(", memId=").append(memId); sb.append(", memName=").append(memName); + sb.append(", memPhone=").append(memPhone); sb.append(", payModel=").append(payModel); sb.append(", payType=").append(payType); sb.append(", payGold=").append(payGold); diff --git a/hai-service/src/main/java/com/hai/entity/HighOrderExample.java b/hai-service/src/main/java/com/hai/entity/HighOrderExample.java index 4e038c4d..3bdc3317 100644 --- a/hai-service/src/main/java/com/hai/entity/HighOrderExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighOrderExample.java @@ -386,6 +386,76 @@ public class HighOrderExample { return (Criteria) this; } + public Criteria andMemPhoneIsNull() { + addCriterion("mem_phone is null"); + return (Criteria) this; + } + + public Criteria andMemPhoneIsNotNull() { + addCriterion("mem_phone is not null"); + return (Criteria) this; + } + + public Criteria andMemPhoneEqualTo(String value) { + addCriterion("mem_phone =", value, "memPhone"); + return (Criteria) this; + } + + public Criteria andMemPhoneNotEqualTo(String value) { + addCriterion("mem_phone <>", value, "memPhone"); + return (Criteria) this; + } + + public Criteria andMemPhoneGreaterThan(String value) { + addCriterion("mem_phone >", value, "memPhone"); + return (Criteria) this; + } + + public Criteria andMemPhoneGreaterThanOrEqualTo(String value) { + addCriterion("mem_phone >=", value, "memPhone"); + return (Criteria) this; + } + + public Criteria andMemPhoneLessThan(String value) { + addCriterion("mem_phone <", value, "memPhone"); + return (Criteria) this; + } + + public Criteria andMemPhoneLessThanOrEqualTo(String value) { + addCriterion("mem_phone <=", value, "memPhone"); + return (Criteria) this; + } + + public Criteria andMemPhoneLike(String value) { + addCriterion("mem_phone like", value, "memPhone"); + return (Criteria) this; + } + + public Criteria andMemPhoneNotLike(String value) { + addCriterion("mem_phone not like", value, "memPhone"); + return (Criteria) this; + } + + public Criteria andMemPhoneIn(List values) { + addCriterion("mem_phone in", values, "memPhone"); + return (Criteria) this; + } + + public Criteria andMemPhoneNotIn(List values) { + addCriterion("mem_phone not in", values, "memPhone"); + return (Criteria) this; + } + + public Criteria andMemPhoneBetween(String value1, String value2) { + addCriterion("mem_phone between", value1, value2, "memPhone"); + return (Criteria) this; + } + + public Criteria andMemPhoneNotBetween(String value1, String value2) { + addCriterion("mem_phone not between", value1, value2, "memPhone"); + return (Criteria) this; + } + public Criteria andPayModelIsNull() { addCriterion("pay_model is null"); return (Criteria) this;