diff --git a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java index ffdbb91a..313e23bd 100644 --- a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java @@ -39,40 +39,42 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into out_recharge_order (`type`, operator_name, ", - "operator_type, order_no, ", - "recharge_type, mem_discount_id, ", - "mem_discount_name, user_id, ", - "user_name, user_phone, ", - "goods_id, recharge_content, ", - "pay_type, labor_union_card, ", - "integral_num, discount_deduction_price, ", - "integral_deduction_price, pay_real_price, ", - "pay_serial_no, create_timed, ", - "pay_time, cancel_time, ", - "finish_time, out_refund_no, ", - "order_price, refund_time, ", - "tp_refund_order_no, refund_id, ", - "refund_fee, company_id, ", - "pay_status, recharge_status, ", - "ext_1, ext_2, ext_3)", - "values (#{type,jdbcType=INTEGER}, #{operatorName,jdbcType=VARCHAR}, ", - "#{operatorType,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, ", - "#{rechargeType,jdbcType=INTEGER}, #{memDiscountId,jdbcType=BIGINT}, ", - "#{memDiscountName,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ", - "#{userName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, ", - "#{goodsId,jdbcType=BIGINT}, #{rechargeContent,jdbcType=VARCHAR}, ", - "#{payType,jdbcType=INTEGER}, #{laborUnionCard,jdbcType=VARCHAR}, ", - "#{integralNum,jdbcType=DECIMAL}, #{discountDeductionPrice,jdbcType=DECIMAL}, ", - "#{integralDeductionPrice,jdbcType=DECIMAL}, #{payRealPrice,jdbcType=DECIMAL}, ", - "#{paySerialNo,jdbcType=VARCHAR}, #{createTimed,jdbcType=TIMESTAMP}, ", - "#{payTime,jdbcType=TIMESTAMP}, #{cancelTime,jdbcType=TIMESTAMP}, ", - "#{finishTime,jdbcType=TIMESTAMP}, #{outRefundNo,jdbcType=VARCHAR}, ", - "#{orderPrice,jdbcType=DECIMAL}, #{refundTime,jdbcType=TIMESTAMP}, ", - "#{tpRefundOrderNo,jdbcType=VARCHAR}, #{refundId,jdbcType=VARCHAR}, ", - "#{refundFee,jdbcType=DECIMAL}, #{companyId,jdbcType=BIGINT}, ", - "#{payStatus,jdbcType=INTEGER}, #{rechargeStatus,jdbcType=INTEGER}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "insert into out_recharge_order (recharge_price, `type`, ", + "operator_name, operator_type, ", + "order_no, recharge_type, ", + "mem_discount_id, mem_discount_name, ", + "user_id, user_name, ", + "user_phone, goods_id, ", + "recharge_content, pay_type, ", + "labor_union_card, integral_num, ", + "discount_deduction_price, integral_deduction_price, ", + "pay_real_price, pay_serial_no, ", + "create_timed, pay_time, ", + "cancel_time, finish_time, ", + "out_refund_no, order_price, ", + "refund_time, tp_refund_order_no, ", + "refund_id, refund_fee, ", + "company_id, pay_status, ", + "recharge_status, ext_1, ", + "ext_2, ext_3)", + "values (#{rechargePrice,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER}, ", + "#{operatorName,jdbcType=VARCHAR}, #{operatorType,jdbcType=INTEGER}, ", + "#{orderNo,jdbcType=VARCHAR}, #{rechargeType,jdbcType=INTEGER}, ", + "#{memDiscountId,jdbcType=BIGINT}, #{memDiscountName,jdbcType=VARCHAR}, ", + "#{userId,jdbcType=BIGINT}, #{userName,jdbcType=VARCHAR}, ", + "#{userPhone,jdbcType=VARCHAR}, #{goodsId,jdbcType=BIGINT}, ", + "#{rechargeContent,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER}, ", + "#{laborUnionCard,jdbcType=VARCHAR}, #{integralNum,jdbcType=DECIMAL}, ", + "#{discountDeductionPrice,jdbcType=DECIMAL}, #{integralDeductionPrice,jdbcType=DECIMAL}, ", + "#{payRealPrice,jdbcType=DECIMAL}, #{paySerialNo,jdbcType=VARCHAR}, ", + "#{createTimed,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ", + "#{cancelTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ", + "#{outRefundNo,jdbcType=VARCHAR}, #{orderPrice,jdbcType=DECIMAL}, ", + "#{refundTime,jdbcType=TIMESTAMP}, #{tpRefundOrderNo,jdbcType=VARCHAR}, ", + "#{refundId,jdbcType=VARCHAR}, #{refundFee,jdbcType=DECIMAL}, ", + "#{companyId,jdbcType=BIGINT}, #{payStatus,jdbcType=INTEGER}, ", + "#{rechargeStatus,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(OutRechargeOrder record); @@ -84,6 +86,7 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { @SelectProvider(type=OutRechargeOrderSqlProvider.class, method="selectByExample") @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="recharge_price", property="rechargePrice", jdbcType=JdbcType.DECIMAL), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="operator_type", property="operatorType", jdbcType=JdbcType.INTEGER), @@ -124,17 +127,19 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { @Select({ "select", - "id, `type`, operator_name, operator_type, order_no, recharge_type, mem_discount_id, ", - "mem_discount_name, user_id, user_name, user_phone, goods_id, recharge_content, ", - "pay_type, labor_union_card, integral_num, discount_deduction_price, integral_deduction_price, ", - "pay_real_price, pay_serial_no, create_timed, pay_time, cancel_time, finish_time, ", - "out_refund_no, order_price, refund_time, tp_refund_order_no, refund_id, refund_fee, ", - "company_id, pay_status, recharge_status, ext_1, ext_2, ext_3", + "id, recharge_price, `type`, operator_name, operator_type, order_no, recharge_type, ", + "mem_discount_id, mem_discount_name, user_id, user_name, user_phone, goods_id, ", + "recharge_content, pay_type, labor_union_card, integral_num, discount_deduction_price, ", + "integral_deduction_price, pay_real_price, pay_serial_no, create_timed, pay_time, ", + "cancel_time, finish_time, out_refund_no, order_price, refund_time, tp_refund_order_no, ", + "refund_id, refund_fee, company_id, pay_status, recharge_status, ext_1, ext_2, ", + "ext_3", "from out_recharge_order", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="recharge_price", property="rechargePrice", jdbcType=JdbcType.DECIMAL), @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="operator_type", property="operatorType", jdbcType=JdbcType.INTEGER), @@ -184,7 +189,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { @Update({ "update out_recharge_order", - "set `type` = #{type,jdbcType=INTEGER},", + "set recharge_price = #{rechargePrice,jdbcType=DECIMAL},", + "`type` = #{type,jdbcType=INTEGER},", "operator_name = #{operatorName,jdbcType=VARCHAR},", "operator_type = #{operatorType,jdbcType=INTEGER},", "order_no = #{orderNo,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java index ee704500..13a330b5 100644 --- a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java @@ -28,6 +28,10 @@ public class OutRechargeOrderSqlProvider { SQL sql = new SQL(); sql.INSERT_INTO("out_recharge_order"); + if (record.getRechargePrice() != null) { + sql.VALUES("recharge_price", "#{rechargePrice,jdbcType=DECIMAL}"); + } + if (record.getType() != null) { sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); } @@ -178,6 +182,7 @@ public class OutRechargeOrderSqlProvider { } else { sql.SELECT("id"); } + sql.SELECT("recharge_price"); sql.SELECT("`type`"); sql.SELECT("operator_name"); sql.SELECT("operator_type"); @@ -234,6 +239,10 @@ public class OutRechargeOrderSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); } + if (record.getRechargePrice() != null) { + sql.SET("recharge_price = #{record.rechargePrice,jdbcType=DECIMAL}"); + } + if (record.getType() != null) { sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); } @@ -383,6 +392,7 @@ public class OutRechargeOrderSqlProvider { sql.UPDATE("out_recharge_order"); sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("recharge_price = #{record.rechargePrice,jdbcType=DECIMAL}"); sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}"); sql.SET("operator_type = #{record.operatorType,jdbcType=INTEGER}"); @@ -428,6 +438,10 @@ public class OutRechargeOrderSqlProvider { SQL sql = new SQL(); sql.UPDATE("out_recharge_order"); + if (record.getRechargePrice() != null) { + sql.SET("recharge_price = #{rechargePrice,jdbcType=DECIMAL}"); + } + if (record.getType() != null) { sql.SET("`type` = #{type,jdbcType=INTEGER}"); } diff --git a/hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java b/hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java index 5a86b475..188fe3a4 100644 --- a/hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java +++ b/hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java @@ -19,6 +19,11 @@ public class OutRechargeOrder implements Serializable { */ private Long id; + /** + * 充值金额 + */ + private BigDecimal rechargePrice; + /** * 类型:1 话费充值 */ @@ -195,6 +200,14 @@ public class OutRechargeOrder implements Serializable { this.id = id; } + public BigDecimal getRechargePrice() { + return rechargePrice; + } + + public void setRechargePrice(BigDecimal rechargePrice) { + this.rechargePrice = rechargePrice; + } + public Integer getType() { return type; } @@ -488,6 +501,7 @@ public class OutRechargeOrder implements Serializable { } OutRechargeOrder other = (OutRechargeOrder) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getRechargePrice() == null ? other.getRechargePrice() == null : this.getRechargePrice().equals(other.getRechargePrice())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName())) && (this.getOperatorType() == null ? other.getOperatorType() == null : this.getOperatorType().equals(other.getOperatorType())) @@ -530,6 +544,7 @@ public class OutRechargeOrder implements Serializable { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getRechargePrice() == null) ? 0 : getRechargePrice().hashCode()); result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().hashCode()); result = prime * result + ((getOperatorType() == null) ? 0 : getOperatorType().hashCode()); @@ -575,6 +590,7 @@ public class OutRechargeOrder implements Serializable { sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); + sb.append(", rechargePrice=").append(rechargePrice); sb.append(", type=").append(type); sb.append(", operatorName=").append(operatorName); sb.append(", operatorType=").append(operatorType); diff --git a/hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java b/hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java index 75aba6c0..452a2838 100644 --- a/hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java +++ b/hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java @@ -186,6 +186,66 @@ public class OutRechargeOrderExample { return (Criteria) this; } + public Criteria andRechargePriceIsNull() { + addCriterion("recharge_price is null"); + return (Criteria) this; + } + + public Criteria andRechargePriceIsNotNull() { + addCriterion("recharge_price is not null"); + return (Criteria) this; + } + + public Criteria andRechargePriceEqualTo(BigDecimal value) { + addCriterion("recharge_price =", value, "rechargePrice"); + return (Criteria) this; + } + + public Criteria andRechargePriceNotEqualTo(BigDecimal value) { + addCriterion("recharge_price <>", value, "rechargePrice"); + return (Criteria) this; + } + + public Criteria andRechargePriceGreaterThan(BigDecimal value) { + addCriterion("recharge_price >", value, "rechargePrice"); + return (Criteria) this; + } + + public Criteria andRechargePriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("recharge_price >=", value, "rechargePrice"); + return (Criteria) this; + } + + public Criteria andRechargePriceLessThan(BigDecimal value) { + addCriterion("recharge_price <", value, "rechargePrice"); + return (Criteria) this; + } + + public Criteria andRechargePriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("recharge_price <=", value, "rechargePrice"); + return (Criteria) this; + } + + public Criteria andRechargePriceIn(List values) { + addCriterion("recharge_price in", values, "rechargePrice"); + return (Criteria) this; + } + + public Criteria andRechargePriceNotIn(List values) { + addCriterion("recharge_price not in", values, "rechargePrice"); + return (Criteria) this; + } + + public Criteria andRechargePriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("recharge_price between", value1, value2, "rechargePrice"); + return (Criteria) this; + } + + public Criteria andRechargePriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("recharge_price not between", value1, value2, "rechargePrice"); + return (Criteria) this; + } + public Criteria andTypeIsNull() { addCriterion("`type` is null"); return (Criteria) this;