From 5194c50f969726c893ee1d07835430ed23771830 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 30 Nov 2021 15:49:33 +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 --- .../cweb/controller/HighOrderController.java | 1 - .../OutRechargeOrderController.java | 66 ++++++ .../com/hai/dao/OutRechargeOrderMapper.java | 58 ++++-- .../hai/dao/OutRechargeOrderSqlProvider.java | 42 ++++ .../java/com/hai/entity/OutRechargeOrder.java | 50 ++++- .../hai/entity/OutRechargeOrderExample.java | 190 ++++++++++++++++++ 6 files changed, 383 insertions(+), 24 deletions(-) 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 2edbec9b..64332c7e 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -263,7 +263,6 @@ public class HighOrderController { throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, "此优惠券只能购买卡券商品使用"); } } else if (highDiscountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type3.getType())) { - // 1:卡卷 2:金币充值 3:团油【加油站】 4: KFC 5:电影票 6:话费充值 if (!highOrder.getHighChildOrderList().get(0).getGoodsType().equals(6)) { log.error("HighOrderController --> addOrder() error!", "此优惠券只能充值话费中使用"); throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, "此优惠券只能充值话费中使用"); diff --git a/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java index a9d50c1c..6ad180fa 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java @@ -22,6 +22,7 @@ import com.hai.config.CommonSysConst; import com.hai.config.UnionPayConfig; import com.hai.dao.SecDictionaryMapper; import com.hai.entity.*; +import com.hai.enum_type.DiscountUseScope; import com.hai.enum_type.GoodsType; import com.hai.enum_type.PayType; import com.hai.model.HighUserModel; @@ -91,6 +92,8 @@ public class OutRechargeOrderController { @Resource private UnionPayConfig unionPayConfig; + @Resource + private HighDiscountUserRelService highDiscountUserRelService; @RequestMapping(value="/addOrder",method = RequestMethod.POST) @ResponseBody @@ -129,6 +132,69 @@ public class OutRechargeOrderController { throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_IS_ERROR); } + HighDiscountUserRel highDiscountUserRel = null; + if (outRechargeOrder.getMemDiscountId() != null) { + // 卡优惠券信息 + highDiscountUserRel = highDiscountUserRelService.getRelById(outRechargeOrder.getMemDiscountId()); + if (highDiscountUserRel == null || highDiscountUserRel.getStatus() != 1) { + log.error("HighOrderController --> addOrder() error!", "优惠券状态错误"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券状态错误"); + } + if (!highDiscountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type1.getType()) + || !highDiscountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type3.getType())) { + log.error("HighOrderController --> addOrder() error!", "无法使用此优惠券"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法使用此优惠券"); + } + } + + // 优惠券抵扣 + if (highDiscountUserRel != null) { + outRechargeOrder.setMemDiscountName(highDiscountUserRel.getHighDiscount().getDiscountName()); + + // 卡卷类型 1:满减 2:抵扣 3:折扣 + if (highDiscountUserRel.getHighDiscount().getDiscountType() == 1) { + // 如果订单总额 小于 满减价格 + if (outRechargeOrder.getOrderPrice().compareTo(highDiscountUserRel.getHighDiscount().getDiscountCondition()) > 1) { + log.error("HighOrderController --> addOrder() error!", "订单未达到满减额度"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, "订单未达到"+highDiscountUserRel.getHighDiscount().getDiscountCondition()+"元,无法使用此优惠券"); + } + // 订单总额 - 满减额度 + BigDecimal payPrice = outRechargeOrder.getOrderPrice().subtract(highDiscountUserRel.getHighDiscount().getDiscountPrice()); + + outRechargeOrder.setDeductionPrice(highDiscountUserRel.getHighDiscount().getDiscountPrice()); + // 如果总额小于0 + if (payPrice.compareTo(new BigDecimal("0")) == -1) { + outRechargeOrder.setPayPrice(new BigDecimal("0")); + } else { + outRechargeOrder.setPayPrice(payPrice); + } + } + + // 卡卷类型 1:满减 2:抵扣 3:折扣 + if (highDiscountUserRel.getHighDiscount().getDiscountType() == 2) { + // 订单总额 - 满减额度 + BigDecimal payPrice = outRechargeOrder.getOrderPrice().subtract(highDiscountUserRel.getHighDiscount().getDiscountPrice()); + outRechargeOrder.setDeductionPrice(highDiscountUserRel.getHighDiscount().getDiscountPrice()); + + // 如果总额小于0 + if (payPrice.compareTo(new BigDecimal("0")) == -1) { + outRechargeOrder.setPayPrice(new BigDecimal("0")); + } else { + outRechargeOrder.setPayPrice(payPrice); + } + } + + // 卡卷类型 1:满减 2:抵扣 3:折扣 + if (highDiscountUserRel.getHighDiscount().getDiscountType() == 3) { + // 折扣除100 + BigDecimal discountPrice = highDiscountUserRel.getHighDiscount().getDiscountPrice().divide(new BigDecimal("10")); + // 订单总额 * 折扣 + BigDecimal payPrice = outRechargeOrder.getOrderPrice().multiply(discountPrice); + outRechargeOrder.setDeductionPrice(outRechargeOrder.getOrderPrice().subtract(payPrice)); + outRechargeOrder.setPayPrice(payPrice); + } + } + HighUserCard highUserCard = highUserCardService.getUserHtlCardNo(userInfoModel.getHighUser().getId()); if (highUserCard != null) { outRechargeOrder.setIdCard(highUserCard.getCardNo()); 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 d8dd5f0c..026e74d2 100644 --- a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java @@ -39,32 +39,36 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into out_recharge_order (order_no, user_id, ", + "insert into out_recharge_order (order_no, mem_discount_id, ", + "mem_discount_name, user_id, ", "user_name, user_phone, ", "recharge_model, pay_type, ", "pay_price, order_price, ", "pay_real_price, pay_serial_no, ", - "`status`, recharge_content, ", - "recharge_name, id_card, ", - "create_timed, pay_time, ", - "cancel_time, finish_time, ", - "remarks, out_refund_no, ", - "refund_time, refund_id, ", - "refund_fee, agent_key, ", - "object_id, Identification_code)", - "values (#{orderNo,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ", + "deduction_price, `status`, ", + "recharge_content, recharge_name, ", + "id_card, create_timed, ", + "pay_time, cancel_time, ", + "finish_time, remarks, ", + "out_refund_no, refund_time, ", + "refund_id, refund_fee, ", + "agent_key, object_id, ", + "Identification_code)", + "values (#{orderNo,jdbcType=VARCHAR}, #{memDiscountId,jdbcType=BIGINT}, ", + "#{memDiscountName,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ", "#{userName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, ", "#{rechargeModel,jdbcType=INTEGER}, #{payType,jdbcType=INTEGER}, ", "#{payPrice,jdbcType=DECIMAL}, #{orderPrice,jdbcType=DECIMAL}, ", "#{payRealPrice,jdbcType=DECIMAL}, #{paySerialNo,jdbcType=VARCHAR}, ", - "#{status,jdbcType=INTEGER}, #{rechargeContent,jdbcType=VARCHAR}, ", - "#{rechargeName,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, ", - "#{createTimed,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ", - "#{cancelTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ", - "#{remarks,jdbcType=VARCHAR}, #{outRefundNo,jdbcType=VARCHAR}, ", - "#{refundTime,jdbcType=TIMESTAMP}, #{refundId,jdbcType=VARCHAR}, ", - "#{refundFee,jdbcType=DECIMAL}, #{agentKey,jdbcType=VARCHAR}, ", - "#{objectId,jdbcType=INTEGER}, #{identificationCode,jdbcType=BIGINT})" + "#{deductionPrice,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", + "#{rechargeContent,jdbcType=VARCHAR}, #{rechargeName,jdbcType=VARCHAR}, ", + "#{idCard,jdbcType=VARCHAR}, #{createTimed,jdbcType=TIMESTAMP}, ", + "#{payTime,jdbcType=TIMESTAMP}, #{cancelTime,jdbcType=TIMESTAMP}, ", + "#{finishTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, ", + "#{outRefundNo,jdbcType=VARCHAR}, #{refundTime,jdbcType=TIMESTAMP}, ", + "#{refundId,jdbcType=VARCHAR}, #{refundFee,jdbcType=DECIMAL}, ", + "#{agentKey,jdbcType=VARCHAR}, #{objectId,jdbcType=INTEGER}, ", + "#{identificationCode,jdbcType=BIGINT})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(OutRechargeOrder record); @@ -77,6 +81,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), + @Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), @@ -86,6 +92,7 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { @Result(column="order_price", property="orderPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), + @Result(column="deduction_price", property="deductionPrice", jdbcType=JdbcType.DECIMAL), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="recharge_content", property="rechargeContent", jdbcType=JdbcType.VARCHAR), @Result(column="recharge_name", property="rechargeName", jdbcType=JdbcType.VARCHAR), @@ -107,16 +114,19 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { @Select({ "select", - "id, order_no, user_id, user_name, user_phone, recharge_model, pay_type, pay_price, ", - "order_price, pay_real_price, pay_serial_no, `status`, recharge_content, recharge_name, ", - "id_card, create_timed, pay_time, cancel_time, finish_time, remarks, out_refund_no, ", - "refund_time, refund_id, refund_fee, agent_key, object_id, Identification_code", + "id, order_no, mem_discount_id, mem_discount_name, user_id, user_name, user_phone, ", + "recharge_model, pay_type, pay_price, order_price, pay_real_price, pay_serial_no, ", + "deduction_price, `status`, recharge_content, recharge_name, id_card, create_timed, ", + "pay_time, cancel_time, finish_time, remarks, out_refund_no, refund_time, refund_id, ", + "refund_fee, agent_key, object_id, Identification_code", "from out_recharge_order", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), + @Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), @@ -126,6 +136,7 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { @Result(column="order_price", property="orderPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), + @Result(column="deduction_price", property="deductionPrice", jdbcType=JdbcType.DECIMAL), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="recharge_content", property="rechargeContent", jdbcType=JdbcType.VARCHAR), @Result(column="recharge_name", property="rechargeName", jdbcType=JdbcType.VARCHAR), @@ -157,6 +168,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { @Update({ "update out_recharge_order", "set order_no = #{orderNo,jdbcType=VARCHAR},", + "mem_discount_id = #{memDiscountId,jdbcType=BIGINT},", + "mem_discount_name = #{memDiscountName,jdbcType=VARCHAR},", "user_id = #{userId,jdbcType=BIGINT},", "user_name = #{userName,jdbcType=VARCHAR},", "user_phone = #{userPhone,jdbcType=VARCHAR},", @@ -166,6 +179,7 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt { "order_price = #{orderPrice,jdbcType=DECIMAL},", "pay_real_price = #{payRealPrice,jdbcType=DECIMAL},", "pay_serial_no = #{paySerialNo,jdbcType=VARCHAR},", + "deduction_price = #{deductionPrice,jdbcType=DECIMAL},", "`status` = #{status,jdbcType=INTEGER},", "recharge_content = #{rechargeContent,jdbcType=VARCHAR},", "recharge_name = #{rechargeName,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 78b40978..dbb04e67 100644 --- a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java @@ -32,6 +32,14 @@ public class OutRechargeOrderSqlProvider { sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); } + if (record.getMemDiscountId() != null) { + sql.VALUES("mem_discount_id", "#{memDiscountId,jdbcType=BIGINT}"); + } + + if (record.getMemDiscountName() != null) { + sql.VALUES("mem_discount_name", "#{memDiscountName,jdbcType=VARCHAR}"); + } + if (record.getUserId() != null) { sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); } @@ -68,6 +76,10 @@ public class OutRechargeOrderSqlProvider { sql.VALUES("pay_serial_no", "#{paySerialNo,jdbcType=VARCHAR}"); } + if (record.getDeductionPrice() != null) { + sql.VALUES("deduction_price", "#{deductionPrice,jdbcType=DECIMAL}"); + } + if (record.getStatus() != null) { sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); } @@ -143,6 +155,8 @@ public class OutRechargeOrderSqlProvider { sql.SELECT("id"); } sql.SELECT("order_no"); + sql.SELECT("mem_discount_id"); + sql.SELECT("mem_discount_name"); sql.SELECT("user_id"); sql.SELECT("user_name"); sql.SELECT("user_phone"); @@ -152,6 +166,7 @@ public class OutRechargeOrderSqlProvider { sql.SELECT("order_price"); sql.SELECT("pay_real_price"); sql.SELECT("pay_serial_no"); + sql.SELECT("deduction_price"); sql.SELECT("`status`"); sql.SELECT("recharge_content"); sql.SELECT("recharge_name"); @@ -193,6 +208,14 @@ public class OutRechargeOrderSqlProvider { sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); } + if (record.getMemDiscountId() != null) { + sql.SET("mem_discount_id = #{record.memDiscountId,jdbcType=BIGINT}"); + } + + if (record.getMemDiscountName() != null) { + sql.SET("mem_discount_name = #{record.memDiscountName,jdbcType=VARCHAR}"); + } + if (record.getUserId() != null) { sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); } @@ -229,6 +252,10 @@ public class OutRechargeOrderSqlProvider { sql.SET("pay_serial_no = #{record.paySerialNo,jdbcType=VARCHAR}"); } + if (record.getDeductionPrice() != null) { + sql.SET("deduction_price = #{record.deductionPrice,jdbcType=DECIMAL}"); + } + if (record.getStatus() != null) { sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); } @@ -303,6 +330,8 @@ public class OutRechargeOrderSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + sql.SET("mem_discount_id = #{record.memDiscountId,jdbcType=BIGINT}"); + sql.SET("mem_discount_name = #{record.memDiscountName,jdbcType=VARCHAR}"); sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}"); sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); @@ -312,6 +341,7 @@ public class OutRechargeOrderSqlProvider { sql.SET("order_price = #{record.orderPrice,jdbcType=DECIMAL}"); sql.SET("pay_real_price = #{record.payRealPrice,jdbcType=DECIMAL}"); sql.SET("pay_serial_no = #{record.paySerialNo,jdbcType=VARCHAR}"); + sql.SET("deduction_price = #{record.deductionPrice,jdbcType=DECIMAL}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("recharge_content = #{record.rechargeContent,jdbcType=VARCHAR}"); sql.SET("recharge_name = #{record.rechargeName,jdbcType=VARCHAR}"); @@ -342,6 +372,14 @@ public class OutRechargeOrderSqlProvider { sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); } + if (record.getMemDiscountId() != null) { + sql.SET("mem_discount_id = #{memDiscountId,jdbcType=BIGINT}"); + } + + if (record.getMemDiscountName() != null) { + sql.SET("mem_discount_name = #{memDiscountName,jdbcType=VARCHAR}"); + } + if (record.getUserId() != null) { sql.SET("user_id = #{userId,jdbcType=BIGINT}"); } @@ -378,6 +416,10 @@ public class OutRechargeOrderSqlProvider { sql.SET("pay_serial_no = #{paySerialNo,jdbcType=VARCHAR}"); } + if (record.getDeductionPrice() != null) { + sql.SET("deduction_price = #{deductionPrice,jdbcType=DECIMAL}"); + } + if (record.getStatus() != null) { sql.SET("`status` = #{status,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 cd0d3586..f3905a57 100644 --- a/hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java +++ b/hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java @@ -24,6 +24,16 @@ public class OutRechargeOrder implements Serializable { */ private String orderNo; + /** + * 用户的优惠券high_discount_user_rel表的id + */ + private Long memDiscountId; + + /** + * 用户的优惠券名称 + */ + private String memDiscountName; + /** * 用户表ID */ @@ -45,7 +55,7 @@ public class OutRechargeOrder implements Serializable { private Integer rechargeModel; /** - * 1.微信 2.工会卡 3.积分 + * 1.微信 2.工会卡 3.积分 4. 银联 */ private Integer payType; @@ -69,6 +79,11 @@ public class OutRechargeOrder implements Serializable { */ private String paySerialNo; + /** + * 抵扣金额 + */ + private BigDecimal deductionPrice; + /** * 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款 */ @@ -161,6 +176,22 @@ public class OutRechargeOrder implements Serializable { this.orderNo = orderNo; } + public Long getMemDiscountId() { + return memDiscountId; + } + + public void setMemDiscountId(Long memDiscountId) { + this.memDiscountId = memDiscountId; + } + + public String getMemDiscountName() { + return memDiscountName; + } + + public void setMemDiscountName(String memDiscountName) { + this.memDiscountName = memDiscountName; + } + public Long getUserId() { return userId; } @@ -233,6 +264,14 @@ public class OutRechargeOrder implements Serializable { this.paySerialNo = paySerialNo; } + public BigDecimal getDeductionPrice() { + return deductionPrice; + } + + public void setDeductionPrice(BigDecimal deductionPrice) { + this.deductionPrice = deductionPrice; + } + public Integer getStatus() { return status; } @@ -375,6 +414,8 @@ public class OutRechargeOrder implements Serializable { OutRechargeOrder other = (OutRechargeOrder) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) + && (this.getMemDiscountId() == null ? other.getMemDiscountId() == null : this.getMemDiscountId().equals(other.getMemDiscountId())) + && (this.getMemDiscountName() == null ? other.getMemDiscountName() == null : this.getMemDiscountName().equals(other.getMemDiscountName())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName())) && (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone())) @@ -384,6 +425,7 @@ public class OutRechargeOrder implements Serializable { && (this.getOrderPrice() == null ? other.getOrderPrice() == null : this.getOrderPrice().equals(other.getOrderPrice())) && (this.getPayRealPrice() == null ? other.getPayRealPrice() == null : this.getPayRealPrice().equals(other.getPayRealPrice())) && (this.getPaySerialNo() == null ? other.getPaySerialNo() == null : this.getPaySerialNo().equals(other.getPaySerialNo())) + && (this.getDeductionPrice() == null ? other.getDeductionPrice() == null : this.getDeductionPrice().equals(other.getDeductionPrice())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getRechargeContent() == null ? other.getRechargeContent() == null : this.getRechargeContent().equals(other.getRechargeContent())) && (this.getRechargeName() == null ? other.getRechargeName() == null : this.getRechargeName().equals(other.getRechargeName())) @@ -408,6 +450,8 @@ public class OutRechargeOrder implements Serializable { int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); + result = prime * result + ((getMemDiscountId() == null) ? 0 : getMemDiscountId().hashCode()); + result = prime * result + ((getMemDiscountName() == null) ? 0 : getMemDiscountName().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode()); result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode()); @@ -417,6 +461,7 @@ public class OutRechargeOrder implements Serializable { result = prime * result + ((getOrderPrice() == null) ? 0 : getOrderPrice().hashCode()); result = prime * result + ((getPayRealPrice() == null) ? 0 : getPayRealPrice().hashCode()); result = prime * result + ((getPaySerialNo() == null) ? 0 : getPaySerialNo().hashCode()); + result = prime * result + ((getDeductionPrice() == null) ? 0 : getDeductionPrice().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getRechargeContent() == null) ? 0 : getRechargeContent().hashCode()); result = prime * result + ((getRechargeName() == null) ? 0 : getRechargeName().hashCode()); @@ -444,6 +489,8 @@ public class OutRechargeOrder implements Serializable { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", orderNo=").append(orderNo); + sb.append(", memDiscountId=").append(memDiscountId); + sb.append(", memDiscountName=").append(memDiscountName); sb.append(", userId=").append(userId); sb.append(", userName=").append(userName); sb.append(", userPhone=").append(userPhone); @@ -453,6 +500,7 @@ public class OutRechargeOrder implements Serializable { sb.append(", orderPrice=").append(orderPrice); sb.append(", payRealPrice=").append(payRealPrice); sb.append(", paySerialNo=").append(paySerialNo); + sb.append(", deductionPrice=").append(deductionPrice); sb.append(", status=").append(status); sb.append(", rechargeContent=").append(rechargeContent); sb.append(", rechargeName=").append(rechargeName); 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 bd38360b..c9ebf7e2 100644 --- a/hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java +++ b/hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java @@ -256,6 +256,136 @@ public class OutRechargeOrderExample { return (Criteria) this; } + public Criteria andMemDiscountIdIsNull() { + addCriterion("mem_discount_id is null"); + return (Criteria) this; + } + + public Criteria andMemDiscountIdIsNotNull() { + addCriterion("mem_discount_id is not null"); + return (Criteria) this; + } + + public Criteria andMemDiscountIdEqualTo(Long value) { + addCriterion("mem_discount_id =", value, "memDiscountId"); + return (Criteria) this; + } + + public Criteria andMemDiscountIdNotEqualTo(Long value) { + addCriterion("mem_discount_id <>", value, "memDiscountId"); + return (Criteria) this; + } + + public Criteria andMemDiscountIdGreaterThan(Long value) { + addCriterion("mem_discount_id >", value, "memDiscountId"); + return (Criteria) this; + } + + public Criteria andMemDiscountIdGreaterThanOrEqualTo(Long value) { + addCriterion("mem_discount_id >=", value, "memDiscountId"); + return (Criteria) this; + } + + public Criteria andMemDiscountIdLessThan(Long value) { + addCriterion("mem_discount_id <", value, "memDiscountId"); + return (Criteria) this; + } + + public Criteria andMemDiscountIdLessThanOrEqualTo(Long value) { + addCriterion("mem_discount_id <=", value, "memDiscountId"); + return (Criteria) this; + } + + public Criteria andMemDiscountIdIn(List values) { + addCriterion("mem_discount_id in", values, "memDiscountId"); + return (Criteria) this; + } + + public Criteria andMemDiscountIdNotIn(List values) { + addCriterion("mem_discount_id not in", values, "memDiscountId"); + return (Criteria) this; + } + + public Criteria andMemDiscountIdBetween(Long value1, Long value2) { + addCriterion("mem_discount_id between", value1, value2, "memDiscountId"); + return (Criteria) this; + } + + public Criteria andMemDiscountIdNotBetween(Long value1, Long value2) { + addCriterion("mem_discount_id not between", value1, value2, "memDiscountId"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameIsNull() { + addCriterion("mem_discount_name is null"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameIsNotNull() { + addCriterion("mem_discount_name is not null"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameEqualTo(String value) { + addCriterion("mem_discount_name =", value, "memDiscountName"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameNotEqualTo(String value) { + addCriterion("mem_discount_name <>", value, "memDiscountName"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameGreaterThan(String value) { + addCriterion("mem_discount_name >", value, "memDiscountName"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameGreaterThanOrEqualTo(String value) { + addCriterion("mem_discount_name >=", value, "memDiscountName"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameLessThan(String value) { + addCriterion("mem_discount_name <", value, "memDiscountName"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameLessThanOrEqualTo(String value) { + addCriterion("mem_discount_name <=", value, "memDiscountName"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameLike(String value) { + addCriterion("mem_discount_name like", value, "memDiscountName"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameNotLike(String value) { + addCriterion("mem_discount_name not like", value, "memDiscountName"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameIn(List values) { + addCriterion("mem_discount_name in", values, "memDiscountName"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameNotIn(List values) { + addCriterion("mem_discount_name not in", values, "memDiscountName"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameBetween(String value1, String value2) { + addCriterion("mem_discount_name between", value1, value2, "memDiscountName"); + return (Criteria) this; + } + + public Criteria andMemDiscountNameNotBetween(String value1, String value2) { + addCriterion("mem_discount_name not between", value1, value2, "memDiscountName"); + return (Criteria) this; + } + public Criteria andUserIdIsNull() { addCriterion("user_id is null"); return (Criteria) this; @@ -826,6 +956,66 @@ public class OutRechargeOrderExample { return (Criteria) this; } + public Criteria andDeductionPriceIsNull() { + addCriterion("deduction_price is null"); + return (Criteria) this; + } + + public Criteria andDeductionPriceIsNotNull() { + addCriterion("deduction_price is not null"); + return (Criteria) this; + } + + public Criteria andDeductionPriceEqualTo(BigDecimal value) { + addCriterion("deduction_price =", value, "deductionPrice"); + return (Criteria) this; + } + + public Criteria andDeductionPriceNotEqualTo(BigDecimal value) { + addCriterion("deduction_price <>", value, "deductionPrice"); + return (Criteria) this; + } + + public Criteria andDeductionPriceGreaterThan(BigDecimal value) { + addCriterion("deduction_price >", value, "deductionPrice"); + return (Criteria) this; + } + + public Criteria andDeductionPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("deduction_price >=", value, "deductionPrice"); + return (Criteria) this; + } + + public Criteria andDeductionPriceLessThan(BigDecimal value) { + addCriterion("deduction_price <", value, "deductionPrice"); + return (Criteria) this; + } + + public Criteria andDeductionPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("deduction_price <=", value, "deductionPrice"); + return (Criteria) this; + } + + public Criteria andDeductionPriceIn(List values) { + addCriterion("deduction_price in", values, "deductionPrice"); + return (Criteria) this; + } + + public Criteria andDeductionPriceNotIn(List values) { + addCriterion("deduction_price not in", values, "deductionPrice"); + return (Criteria) this; + } + + public Criteria andDeductionPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("deduction_price between", value1, value2, "deductionPrice"); + return (Criteria) this; + } + + public Criteria andDeductionPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("deduction_price not between", value1, value2, "deductionPrice"); + return (Criteria) this; + } + public Criteria andStatusIsNull() { addCriterion("`status` is null"); return (Criteria) this;