From fd73112464d4e0b3fd482d3d797d5646f589e9c8 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Mon, 30 May 2022 09:26:26 +0800 Subject: [PATCH] 1 --- .../com/hai/dao/OutRechargeOrderMapper.java | 26 ++-- .../hai/dao/OutRechargeOrderSqlProvider.java | 28 ++++ .../java/com/hai/entity/OutRechargeOrder.java | 32 +++++ .../hai/entity/OutRechargeOrderExample.java | 130 ++++++++++++++++++ 4 files changed, 207 insertions(+), 9 deletions(-) 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 0ba5d1c1..d4281da2 100644 --- a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java @@ -39,7 +39,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into out_recharge_order (order_no, recharge_type, ", + "insert into out_recharge_order (`type`, operator_name, ", + "order_no, recharge_type, ", "mem_discount_id, mem_discount_name, ", "user_id, user_name, ", "user_phone, goods_id, ", @@ -55,7 +56,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { "region_id, pay_status, ", "recharge_status, ext_1, ", "ext_2, ext_3)", - "values (#{orderNo,jdbcType=VARCHAR}, #{rechargeType,jdbcType=INTEGER}, ", + "values (#{type,jdbcType=INTEGER}, #{operatorName,jdbcType=VARCHAR}, ", + "#{orderNo,jdbcType=VARCHAR}, #{rechargeType,jdbcType=INTEGER}, ", "#{memDiscountId,jdbcType=BIGINT}, #{memDiscountName,jdbcType=VARCHAR}, ", "#{userId,jdbcType=BIGINT}, #{userName,jdbcType=VARCHAR}, ", "#{userPhone,jdbcType=VARCHAR}, #{goodsId,jdbcType=BIGINT}, ", @@ -82,6 +84,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { @SelectProvider(type=OutRechargeOrderSqlProvider.class, method="selectByExample") @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="recharge_type", property="rechargeType", jdbcType=JdbcType.INTEGER), @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), @@ -119,17 +123,19 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { @Select({ "select", - "id, 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, region_id, pay_status, ", - "recharge_status, ext_1, ext_2, ext_3", + "id, `type`, operator_name, 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, region_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="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="recharge_type", property="rechargeType", jdbcType=JdbcType.INTEGER), @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), @@ -176,7 +182,9 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { @Update({ "update out_recharge_order", - "set order_no = #{orderNo,jdbcType=VARCHAR},", + "set `type` = #{type,jdbcType=INTEGER},", + "operator_name = #{operatorName,jdbcType=VARCHAR},", + "order_no = #{orderNo,jdbcType=VARCHAR},", "recharge_type = #{rechargeType,jdbcType=INTEGER},", "mem_discount_id = #{memDiscountId,jdbcType=BIGINT},", "mem_discount_name = #{memDiscountName,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 8c70e85a..fad8fcb6 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,14 @@ public class OutRechargeOrderSqlProvider { SQL sql = new SQL(); sql.INSERT_INTO("out_recharge_order"); + if (record.getType() != null) { + sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); + } + + if (record.getOperatorName() != null) { + sql.VALUES("operator_name", "#{operatorName,jdbcType=VARCHAR}"); + } + if (record.getOrderNo() != null) { sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); } @@ -166,6 +174,8 @@ public class OutRechargeOrderSqlProvider { } else { sql.SELECT("id"); } + sql.SELECT("`type`"); + sql.SELECT("operator_name"); sql.SELECT("order_no"); sql.SELECT("recharge_type"); sql.SELECT("mem_discount_id"); @@ -219,6 +229,14 @@ public class OutRechargeOrderSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); } + if (record.getType() != null) { + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + } + + if (record.getOperatorName() != null) { + sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}"); + } + if (record.getOrderNo() != null) { sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); } @@ -356,6 +374,8 @@ public class OutRechargeOrderSqlProvider { sql.UPDATE("out_recharge_order"); sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}"); sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); sql.SET("recharge_type = #{record.rechargeType,jdbcType=INTEGER}"); sql.SET("mem_discount_id = #{record.memDiscountId,jdbcType=BIGINT}"); @@ -398,6 +418,14 @@ public class OutRechargeOrderSqlProvider { SQL sql = new SQL(); sql.UPDATE("out_recharge_order"); + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + + if (record.getOperatorName() != null) { + sql.SET("operator_name = #{operatorName,jdbcType=VARCHAR}"); + } + if (record.getOrderNo() != null) { sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); } 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 7e838b69..ed51a9cc 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,16 @@ public class OutRechargeOrder implements Serializable { */ private Long id; + /** + * 类型:1 话费充值 + */ + private Integer type; + + /** + * 运营商 + */ + private String operatorName; + /** * 充值订单号 */ @@ -180,6 +190,22 @@ public class OutRechargeOrder implements Serializable { this.id = id; } + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getOperatorName() { + return operatorName; + } + + public void setOperatorName(String operatorName) { + this.operatorName = operatorName; + } + public String getOrderNo() { return orderNo; } @@ -449,6 +475,8 @@ public class OutRechargeOrder implements Serializable { } OutRechargeOrder other = (OutRechargeOrder) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName())) && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) && (this.getRechargeType() == null ? other.getRechargeType() == null : this.getRechargeType().equals(other.getRechargeType())) && (this.getMemDiscountId() == null ? other.getMemDiscountId() == null : this.getMemDiscountId().equals(other.getMemDiscountId())) @@ -488,6 +516,8 @@ public class OutRechargeOrder implements Serializable { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().hashCode()); result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); result = prime * result + ((getRechargeType() == null) ? 0 : getRechargeType().hashCode()); result = prime * result + ((getMemDiscountId() == null) ? 0 : getMemDiscountId().hashCode()); @@ -530,6 +560,8 @@ public class OutRechargeOrder implements Serializable { sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); + sb.append(", type=").append(type); + sb.append(", operatorName=").append(operatorName); sb.append(", orderNo=").append(orderNo); sb.append(", rechargeType=").append(rechargeType); sb.append(", memDiscountId=").append(memDiscountId); 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 e91dcb47..6fd6f5e9 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,136 @@ public class OutRechargeOrderExample { return (Criteria) this; } + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Integer value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Integer value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Integer value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Integer value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Integer value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Integer value1, Integer value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Integer value1, Integer value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNull() { + addCriterion("operator_name is null"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNotNull() { + addCriterion("operator_name is not null"); + return (Criteria) this; + } + + public Criteria andOperatorNameEqualTo(String value) { + addCriterion("operator_name =", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotEqualTo(String value) { + addCriterion("operator_name <>", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThan(String value) { + addCriterion("operator_name >", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThanOrEqualTo(String value) { + addCriterion("operator_name >=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThan(String value) { + addCriterion("operator_name <", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThanOrEqualTo(String value) { + addCriterion("operator_name <=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLike(String value) { + addCriterion("operator_name like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotLike(String value) { + addCriterion("operator_name not like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameIn(List values) { + addCriterion("operator_name in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotIn(List values) { + addCriterion("operator_name not in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameBetween(String value1, String value2) { + addCriterion("operator_name between", value1, value2, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotBetween(String value1, String value2) { + addCriterion("operator_name not between", value1, value2, "operatorName"); + return (Criteria) this; + } + public Criteria andOrderNoIsNull() { addCriterion("order_no is null"); return (Criteria) this;