dev-discount
胡锐 2 years ago
parent 3ac8d40ed9
commit b124eb007e
  1. 24
      hai-order/src/main/java/com/web/controller/OrderController.java
  2. 9
      hai-order/src/main/java/com/web/controller/OrderPayController.java
  3. 81
      hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java
  4. 168
      hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java
  5. 33
      hai-service/src/main/java/com/hai/dao/HighOrderMapper.java
  6. 198
      hai-service/src/main/java/com/hai/dao/HighOrderRefundMapper.java
  7. 7
      hai-service/src/main/java/com/hai/dao/HighOrderRefundMapperExt.java
  8. 584
      hai-service/src/main/java/com/hai/dao/HighOrderRefundSqlProvider.java
  9. 14
      hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java
  10. 193
      hai-service/src/main/java/com/hai/entity/HighChildOrder.java
  11. 761
      hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java
  12. 16
      hai-service/src/main/java/com/hai/entity/HighOrder.java
  13. 60
      hai-service/src/main/java/com/hai/entity/HighOrderExample.java
  14. 525
      hai-service/src/main/java/com/hai/entity/HighOrderRefund.java
  15. 2194
      hai-service/src/main/java/com/hai/entity/HighOrderRefundExample.java
  16. 15
      hai-service/src/main/java/com/hai/order/model/CreateOrderChildModel.java
  17. 5
      hai-service/src/main/java/com/hai/order/model/CreateOrderModel.java
  18. 2
      hai-service/src/main/java/com/hai/order/service/OrderCreateHandleService.java
  19. 29
      hai-service/src/main/java/com/hai/order/service/OrderRefundService.java
  20. 26
      hai-service/src/main/java/com/hai/order/service/OrderService.java
  21. 40
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  22. 125
      hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java
  23. 165
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java
  24. 53
      hai-service/src/main/java/com/hai/order/type/OrderRefundStatus.java

@ -73,6 +73,8 @@ public class OrderController {
for (CreateOrderChildModel childModel : body.getChildOrderList()) {
childModel.setMemId(body.getMemId());
childModel.setMemName(body.getMemName());
childModel.setMemPhone(body.getMemPhone());
// 校验子订单参数
if (childModel.getGoodsType() == null
@ -109,7 +111,7 @@ public class OrderController {
@RequestMapping(value="/cancel",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "取消订单")
@ApiOperation(value = "订单取消")
public ResponseData cancel(@RequestBody JSONObject body) {
try {
if (body == null || StringUtils.isBlank(body.getString("orderNo"))) {
@ -126,6 +128,23 @@ public class OrderController {
}
}
@RequestMapping(value="/refund",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "订单退款")
public ResponseData refund(@RequestBody JSONObject body) {
try {
if (body == null || StringUtils.isBlank(body.getString("childOrderNo"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到订单");
}
return ResponseMsgUtil.success(null);
} catch (Exception e) {
log.error("OrderController -> cancel() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/paySuccess",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "支付成功")
@ -157,7 +176,4 @@ public class OrderController {
}
}
}

@ -107,11 +107,6 @@ public class OrderPayController {
// 查询订单
HighOrder order = orderService.getOrderDetailByNo(body.getString("orderNo"));
if(order == null) {
log.error("wxPay ERROR",
"未找到订单信息");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, "");
}
if(!order.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) {
log.error("wxPay ERROR", "订单不处于待支付状态");
throw ErrorHelp.genException(SysCode.System, ErrorCode.ORDER_NO_STAY_PAY, "");
@ -281,10 +276,6 @@ public class OrderPayController {
// 查询订单
HighOrder order = orderService.getOrderDetailByNo(body.getString("orderNo"));
if(order == null) {
log.error("OrderController --> orderToPay() ERROR", "未找到订单信息");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, "");
}
if(!order.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) {
log.error("OrderController --> orderToPay() ERROR", "订单不处于待支付状态");
throw ErrorHelp.genException(SysCode.System, ErrorCode.ORDER_NO_STAY_PAY, "");

@ -39,7 +39,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_child_order (order_id, mem_id, ",
"insert into high_child_order (order_id, order_no, ",
"mem_id, mem_name, mem_phone, ",
"child_order_no, store_id, ",
"store_name, store_address, ",
"goods_type, goods_id, ",
@ -47,12 +48,17 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"goods_img, goods_spec_name, ",
"goods_price, goods_actual_price, ",
"total_price, total_actual_price, ",
"sale_count, channel_order_no, ",
"giveaway_type, child_order_status, ",
"praise_status, ext_1, ",
"ext_2, ext_3, ext_4, ",
"ext_5, ext_6)",
"values (#{orderId,jdbcType=BIGINT}, #{memId,jdbcType=BIGINT}, ",
"sale_count, surplus_refund_num, ",
"surplus_refund_price, surplus_refund_integral, ",
"channel_order_no, giveaway_type, ",
"child_order_status, praise_status, ",
"create_time, pay_time, ",
"finish_time, refund_time, ",
"refund_remarks, cancel_time, ",
"ext_1, ext_2, ext_3, ",
"ext_4, ext_5, ext_6)",
"values (#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
"#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ",
"#{childOrderNo,jdbcType=VARCHAR}, #{storeId,jdbcType=BIGINT}, ",
"#{storeName,jdbcType=VARCHAR}, #{storeAddress,jdbcType=VARCHAR}, ",
"#{goodsType,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT}, ",
@ -60,11 +66,15 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"#{goodsImg,jdbcType=VARCHAR}, #{goodsSpecName,jdbcType=VARCHAR}, ",
"#{goodsPrice,jdbcType=DECIMAL}, #{goodsActualPrice,jdbcType=DECIMAL}, ",
"#{totalPrice,jdbcType=DECIMAL}, #{totalActualPrice,jdbcType=DECIMAL}, ",
"#{saleCount,jdbcType=INTEGER}, #{channelOrderNo,jdbcType=VARCHAR}, ",
"#{giveawayType,jdbcType=BIT}, #{childOrderStatus,jdbcType=INTEGER}, ",
"#{praiseStatus,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR}, ",
"#{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
"#{saleCount,jdbcType=INTEGER}, #{surplusRefundNum,jdbcType=INTEGER}, ",
"#{surplusRefundPrice,jdbcType=DECIMAL}, #{surplusRefundIntegral,jdbcType=INTEGER}, ",
"#{channelOrderNo,jdbcType=VARCHAR}, #{giveawayType,jdbcType=BIT}, ",
"#{childOrderStatus,jdbcType=INTEGER}, #{praiseStatus,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ",
"#{finishTime,jdbcType=TIMESTAMP}, #{refundTime,jdbcType=TIMESTAMP}, ",
"#{refundRemarks,jdbcType=VARCHAR}, #{cancelTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighChildOrder record);
@ -77,7 +87,10 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@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="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
@Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
@ -93,10 +106,19 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_actual_price", property="totalActualPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sale_count", property="saleCount", jdbcType=JdbcType.INTEGER),
@Result(column="surplus_refund_num", property="surplusRefundNum", jdbcType=JdbcType.INTEGER),
@Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="surplus_refund_integral", property="surplusRefundIntegral", jdbcType=JdbcType.INTEGER),
@Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="giveaway_type", property="giveawayType", jdbcType=JdbcType.BIT),
@Result(column="child_order_status", property="childOrderStatus", jdbcType=JdbcType.INTEGER),
@Result(column="praise_status", property="praiseStatus", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_remarks", property="refundRemarks", jdbcType=JdbcType.VARCHAR),
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP),
@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),
@ -108,17 +130,23 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Select({
"select",
"id, order_id, mem_id, child_order_no, store_id, store_name, store_address, goods_type, ",
"goods_id, goods_name, goods_desc, goods_img, goods_spec_name, goods_price, goods_actual_price, ",
"total_price, total_actual_price, sale_count, channel_order_no, giveaway_type, ",
"child_order_status, praise_status, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
"id, order_id, order_no, mem_id, mem_name, mem_phone, child_order_no, store_id, ",
"store_name, store_address, goods_type, goods_id, goods_name, goods_desc, goods_img, ",
"goods_spec_name, goods_price, goods_actual_price, total_price, total_actual_price, ",
"sale_count, surplus_refund_num, surplus_refund_price, surplus_refund_integral, ",
"channel_order_no, giveaway_type, child_order_status, praise_status, create_time, ",
"pay_time, finish_time, refund_time, refund_remarks, cancel_time, ext_1, ext_2, ",
"ext_3, ext_4, ext_5, ext_6",
"from high_child_order",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@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="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
@Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
@ -134,10 +162,19 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_actual_price", property="totalActualPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="sale_count", property="saleCount", jdbcType=JdbcType.INTEGER),
@Result(column="surplus_refund_num", property="surplusRefundNum", jdbcType=JdbcType.INTEGER),
@Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="surplus_refund_integral", property="surplusRefundIntegral", jdbcType=JdbcType.INTEGER),
@Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="giveaway_type", property="giveawayType", jdbcType=JdbcType.BIT),
@Result(column="child_order_status", property="childOrderStatus", jdbcType=JdbcType.INTEGER),
@Result(column="praise_status", property="praiseStatus", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_remarks", property="refundRemarks", jdbcType=JdbcType.VARCHAR),
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP),
@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),
@ -159,7 +196,10 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Update({
"update high_child_order",
"set order_id = #{orderId,jdbcType=BIGINT},",
"order_no = #{orderNo,jdbcType=VARCHAR},",
"mem_id = #{memId,jdbcType=BIGINT},",
"mem_name = #{memName,jdbcType=VARCHAR},",
"mem_phone = #{memPhone,jdbcType=VARCHAR},",
"child_order_no = #{childOrderNo,jdbcType=VARCHAR},",
"store_id = #{storeId,jdbcType=BIGINT},",
"store_name = #{storeName,jdbcType=VARCHAR},",
@ -175,10 +215,19 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"total_price = #{totalPrice,jdbcType=DECIMAL},",
"total_actual_price = #{totalActualPrice,jdbcType=DECIMAL},",
"sale_count = #{saleCount,jdbcType=INTEGER},",
"surplus_refund_num = #{surplusRefundNum,jdbcType=INTEGER},",
"surplus_refund_price = #{surplusRefundPrice,jdbcType=DECIMAL},",
"surplus_refund_integral = #{surplusRefundIntegral,jdbcType=INTEGER},",
"channel_order_no = #{channelOrderNo,jdbcType=VARCHAR},",
"giveaway_type = #{giveawayType,jdbcType=BIT},",
"child_order_status = #{childOrderStatus,jdbcType=INTEGER},",
"praise_status = #{praiseStatus,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"pay_time = #{payTime,jdbcType=TIMESTAMP},",
"finish_time = #{finishTime,jdbcType=TIMESTAMP},",
"refund_time = #{refundTime,jdbcType=TIMESTAMP},",
"refund_remarks = #{refundRemarks,jdbcType=VARCHAR},",
"cancel_time = #{cancelTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR},",

@ -32,10 +32,22 @@ public class HighChildOrderSqlProvider {
sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}");
}
if (record.getMemId() != null) {
sql.VALUES("mem_id", "#{memId,jdbcType=BIGINT}");
}
if (record.getMemName() != null) {
sql.VALUES("mem_name", "#{memName,jdbcType=VARCHAR}");
}
if (record.getMemPhone() != null) {
sql.VALUES("mem_phone", "#{memPhone,jdbcType=VARCHAR}");
}
if (record.getChildOrderNo() != null) {
sql.VALUES("child_order_no", "#{childOrderNo,jdbcType=VARCHAR}");
}
@ -96,6 +108,18 @@ public class HighChildOrderSqlProvider {
sql.VALUES("sale_count", "#{saleCount,jdbcType=INTEGER}");
}
if (record.getSurplusRefundNum() != null) {
sql.VALUES("surplus_refund_num", "#{surplusRefundNum,jdbcType=INTEGER}");
}
if (record.getSurplusRefundPrice() != null) {
sql.VALUES("surplus_refund_price", "#{surplusRefundPrice,jdbcType=DECIMAL}");
}
if (record.getSurplusRefundIntegral() != null) {
sql.VALUES("surplus_refund_integral", "#{surplusRefundIntegral,jdbcType=INTEGER}");
}
if (record.getChannelOrderNo() != null) {
sql.VALUES("channel_order_no", "#{channelOrderNo,jdbcType=VARCHAR}");
}
@ -112,6 +136,30 @@ public class HighChildOrderSqlProvider {
sql.VALUES("praise_status", "#{praiseStatus,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getPayTime() != null) {
sql.VALUES("pay_time", "#{payTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.VALUES("finish_time", "#{finishTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundTime() != null) {
sql.VALUES("refund_time", "#{refundTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundRemarks() != null) {
sql.VALUES("refund_remarks", "#{refundRemarks,jdbcType=VARCHAR}");
}
if (record.getCancelTime() != null) {
sql.VALUES("cancel_time", "#{cancelTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
@ -147,7 +195,10 @@ public class HighChildOrderSqlProvider {
sql.SELECT("id");
}
sql.SELECT("order_id");
sql.SELECT("order_no");
sql.SELECT("mem_id");
sql.SELECT("mem_name");
sql.SELECT("mem_phone");
sql.SELECT("child_order_no");
sql.SELECT("store_id");
sql.SELECT("store_name");
@ -163,10 +214,19 @@ public class HighChildOrderSqlProvider {
sql.SELECT("total_price");
sql.SELECT("total_actual_price");
sql.SELECT("sale_count");
sql.SELECT("surplus_refund_num");
sql.SELECT("surplus_refund_price");
sql.SELECT("surplus_refund_integral");
sql.SELECT("channel_order_no");
sql.SELECT("giveaway_type");
sql.SELECT("child_order_status");
sql.SELECT("praise_status");
sql.SELECT("create_time");
sql.SELECT("pay_time");
sql.SELECT("finish_time");
sql.SELECT("refund_time");
sql.SELECT("refund_remarks");
sql.SELECT("cancel_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
@ -198,10 +258,22 @@ public class HighChildOrderSqlProvider {
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
}
if (record.getMemId() != null) {
sql.SET("mem_id = #{record.memId,jdbcType=BIGINT}");
}
if (record.getMemName() != null) {
sql.SET("mem_name = #{record.memName,jdbcType=VARCHAR}");
}
if (record.getMemPhone() != null) {
sql.SET("mem_phone = #{record.memPhone,jdbcType=VARCHAR}");
}
if (record.getChildOrderNo() != null) {
sql.SET("child_order_no = #{record.childOrderNo,jdbcType=VARCHAR}");
}
@ -262,6 +334,18 @@ public class HighChildOrderSqlProvider {
sql.SET("sale_count = #{record.saleCount,jdbcType=INTEGER}");
}
if (record.getSurplusRefundNum() != null) {
sql.SET("surplus_refund_num = #{record.surplusRefundNum,jdbcType=INTEGER}");
}
if (record.getSurplusRefundPrice() != null) {
sql.SET("surplus_refund_price = #{record.surplusRefundPrice,jdbcType=DECIMAL}");
}
if (record.getSurplusRefundIntegral() != null) {
sql.SET("surplus_refund_integral = #{record.surplusRefundIntegral,jdbcType=INTEGER}");
}
if (record.getChannelOrderNo() != null) {
sql.SET("channel_order_no = #{record.channelOrderNo,jdbcType=VARCHAR}");
}
@ -278,6 +362,30 @@ public class HighChildOrderSqlProvider {
sql.SET("praise_status = #{record.praiseStatus,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getPayTime() != null) {
sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundTime() != null) {
sql.SET("refund_time = #{record.refundTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundRemarks() != null) {
sql.SET("refund_remarks = #{record.refundRemarks,jdbcType=VARCHAR}");
}
if (record.getCancelTime() != null) {
sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
@ -312,7 +420,10 @@ public class HighChildOrderSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
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("child_order_no = #{record.childOrderNo,jdbcType=VARCHAR}");
sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}");
sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}");
@ -328,10 +439,19 @@ public class HighChildOrderSqlProvider {
sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}");
sql.SET("total_actual_price = #{record.totalActualPrice,jdbcType=DECIMAL}");
sql.SET("sale_count = #{record.saleCount,jdbcType=INTEGER}");
sql.SET("surplus_refund_num = #{record.surplusRefundNum,jdbcType=INTEGER}");
sql.SET("surplus_refund_price = #{record.surplusRefundPrice,jdbcType=DECIMAL}");
sql.SET("surplus_refund_integral = #{record.surplusRefundIntegral,jdbcType=INTEGER}");
sql.SET("channel_order_no = #{record.channelOrderNo,jdbcType=VARCHAR}");
sql.SET("giveaway_type = #{record.giveawayType,jdbcType=BIT}");
sql.SET("child_order_status = #{record.childOrderStatus,jdbcType=INTEGER}");
sql.SET("praise_status = #{record.praiseStatus,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}");
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}");
sql.SET("refund_time = #{record.refundTime,jdbcType=TIMESTAMP}");
sql.SET("refund_remarks = #{record.refundRemarks,jdbcType=VARCHAR}");
sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
@ -352,10 +472,22 @@ public class HighChildOrderSqlProvider {
sql.SET("order_id = #{orderId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}");
}
if (record.getMemId() != null) {
sql.SET("mem_id = #{memId,jdbcType=BIGINT}");
}
if (record.getMemName() != null) {
sql.SET("mem_name = #{memName,jdbcType=VARCHAR}");
}
if (record.getMemPhone() != null) {
sql.SET("mem_phone = #{memPhone,jdbcType=VARCHAR}");
}
if (record.getChildOrderNo() != null) {
sql.SET("child_order_no = #{childOrderNo,jdbcType=VARCHAR}");
}
@ -416,6 +548,18 @@ public class HighChildOrderSqlProvider {
sql.SET("sale_count = #{saleCount,jdbcType=INTEGER}");
}
if (record.getSurplusRefundNum() != null) {
sql.SET("surplus_refund_num = #{surplusRefundNum,jdbcType=INTEGER}");
}
if (record.getSurplusRefundPrice() != null) {
sql.SET("surplus_refund_price = #{surplusRefundPrice,jdbcType=DECIMAL}");
}
if (record.getSurplusRefundIntegral() != null) {
sql.SET("surplus_refund_integral = #{surplusRefundIntegral,jdbcType=INTEGER}");
}
if (record.getChannelOrderNo() != null) {
sql.SET("channel_order_no = #{channelOrderNo,jdbcType=VARCHAR}");
}
@ -432,6 +576,30 @@ public class HighChildOrderSqlProvider {
sql.SET("praise_status = #{praiseStatus,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getPayTime() != null) {
sql.SET("pay_time = #{payTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.SET("finish_time = #{finishTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundTime() != null) {
sql.SET("refund_time = #{refundTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundRemarks() != null) {
sql.SET("refund_remarks = #{refundRemarks,jdbcType=VARCHAR}");
}
if (record.getCancelTime() != null) {
sql.SET("cancel_time = #{cancelTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}

@ -55,12 +55,12 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"create_time, surplus_refund_price, ",
"pay_time, finish_time, ",
"cancel_time, cancel_remarks, ",
"account_merchant_num, profit_sharing_status, ",
"profit_sharing_record_id, whether_check, ",
"whether_rebate, exception_status, ",
"exception_content, ext_1, ",
"ext_2, ext_3, ext_4, ",
"ext_5, ext_6)",
"refund_time, account_merchant_num, ",
"profit_sharing_status, profit_sharing_record_id, ",
"whether_check, whether_rebate, ",
"exception_status, exception_content, ",
"ext_1, ext_2, ext_3, ",
"ext_4, ext_5, ext_6)",
"values (#{productType,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT}, ",
"#{companyName,jdbcType=VARCHAR}, #{merId,jdbcType=BIGINT}, ",
"#{merName,jdbcType=VARCHAR}, #{storeId,jdbcType=BIGINT}, ",
@ -77,12 +77,12 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"#{createTime,jdbcType=TIMESTAMP}, #{surplusRefundPrice,jdbcType=DECIMAL}, ",
"#{payTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ",
"#{cancelTime,jdbcType=TIMESTAMP}, #{cancelRemarks,jdbcType=VARCHAR}, ",
"#{accountMerchantNum,jdbcType=VARCHAR}, #{profitSharingStatus,jdbcType=BIT}, ",
"#{profitSharingRecordId,jdbcType=BIGINT}, #{whetherCheck,jdbcType=BIT}, ",
"#{whetherRebate,jdbcType=BIT}, #{exceptionStatus,jdbcType=BIT}, ",
"#{exceptionContent,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR}, ",
"#{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
"#{refundTime,jdbcType=TIMESTAMP}, #{accountMerchantNum,jdbcType=VARCHAR}, ",
"#{profitSharingStatus,jdbcType=BIT}, #{profitSharingRecordId,jdbcType=BIGINT}, ",
"#{whetherCheck,jdbcType=BIT}, #{whetherRebate,jdbcType=BIT}, ",
"#{exceptionStatus,jdbcType=BIT}, #{exceptionContent,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighOrder record);
@ -127,6 +127,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="cancel_remarks", property="cancelRemarks", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT),
@Result(column="profit_sharing_record_id", property="profitSharingRecordId", jdbcType=JdbcType.BIGINT),
@ -150,9 +151,9 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"order_no, pay_serial_no, pay_type, mem_card_id, mem_card_type, mem_card_no, ",
"total_price, deduction_price, pay_gold, payable_price, pay_price, pay_real_price, ",
"order_status, remarks, create_time, surplus_refund_price, pay_time, finish_time, ",
"cancel_time, cancel_remarks, account_merchant_num, profit_sharing_status, profit_sharing_record_id, ",
"whether_check, whether_rebate, exception_status, exception_content, ext_1, ext_2, ",
"ext_3, ext_4, ext_5, ext_6",
"cancel_time, cancel_remarks, refund_time, account_merchant_num, profit_sharing_status, ",
"profit_sharing_record_id, whether_check, whether_rebate, exception_status, exception_content, ",
"ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
"from high_order",
"where id = #{id,jdbcType=BIGINT}"
})
@ -191,6 +192,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="cancel_remarks", property="cancelRemarks", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT),
@Result(column="profit_sharing_record_id", property="profitSharingRecordId", jdbcType=JdbcType.BIGINT),
@ -251,6 +253,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"finish_time = #{finishTime,jdbcType=TIMESTAMP},",
"cancel_time = #{cancelTime,jdbcType=TIMESTAMP},",
"cancel_remarks = #{cancelRemarks,jdbcType=VARCHAR},",
"refund_time = #{refundTime,jdbcType=TIMESTAMP},",
"account_merchant_num = #{accountMerchantNum,jdbcType=VARCHAR},",
"profit_sharing_status = #{profitSharingStatus,jdbcType=BIT},",
"profit_sharing_record_id = #{profitSharingRecordId,jdbcType=BIGINT},",

@ -0,0 +1,198 @@
package com.hai.dao;
import com.hai.entity.HighOrderRefund;
import com.hai.entity.HighOrderRefundExample;
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 HighOrderRefundMapper extends HighOrderRefundMapperExt {
@SelectProvider(type=HighOrderRefundSqlProvider.class, method="countByExample")
long countByExample(HighOrderRefundExample example);
@DeleteProvider(type=HighOrderRefundSqlProvider.class, method="deleteByExample")
int deleteByExample(HighOrderRefundExample example);
@Delete({
"delete from high_order_refund",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_order_refund (order_id, order_no, ",
"order_child_id, order_child_no, ",
"mem_id, mem_name, mem_phone, ",
"goods_type, goods_id, ",
"goods_name, goods_desc, ",
"goods_img, goods_spec_name, ",
"goods_count, refund_order, ",
"return_total_price, refund_price, ",
"refund_gold, refund_remark, ",
"refund_status, refund_fail_reason, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3, ",
"ext_4, ext_5, ext_6)",
"values (#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
"#{orderChildId,jdbcType=BIGINT}, #{orderChildNo,jdbcType=VARCHAR}, ",
"#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ",
"#{goodsType,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT}, ",
"#{goodsName,jdbcType=VARCHAR}, #{goodsDesc,jdbcType=VARCHAR}, ",
"#{goodsImg,jdbcType=VARCHAR}, #{goodsSpecName,jdbcType=VARCHAR}, ",
"#{goodsCount,jdbcType=INTEGER}, #{refundOrder,jdbcType=VARCHAR}, ",
"#{returnTotalPrice,jdbcType=DECIMAL}, #{refundPrice,jdbcType=DECIMAL}, ",
"#{refundGold,jdbcType=INTEGER}, #{refundRemark,jdbcType=VARCHAR}, ",
"#{refundStatus,jdbcType=INTEGER}, #{refundFailReason,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighOrderRefund record);
@InsertProvider(type=HighOrderRefundSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighOrderRefund record);
@SelectProvider(type=HighOrderRefundSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="order_child_id", property="orderChildId", jdbcType=JdbcType.BIGINT),
@Result(column="order_child_no", property="orderChildNo", 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="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_desc", property="goodsDesc", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_img", property="goodsImg", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_spec_name", property="goodsSpecName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_count", property="goodsCount", jdbcType=JdbcType.INTEGER),
@Result(column="refund_order", property="refundOrder", jdbcType=JdbcType.VARCHAR),
@Result(column="return_total_price", property="returnTotalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_gold", property="refundGold", jdbcType=JdbcType.INTEGER),
@Result(column="refund_remark", property="refundRemark", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_status", property="refundStatus", jdbcType=JdbcType.INTEGER),
@Result(column="refund_fail_reason", property="refundFailReason", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@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),
@Result(column="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_5", property="ext5", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_6", property="ext6", jdbcType=JdbcType.VARCHAR)
})
List<HighOrderRefund> selectByExample(HighOrderRefundExample example);
@Select({
"select",
"id, order_id, order_no, order_child_id, order_child_no, mem_id, mem_name, mem_phone, ",
"goods_type, goods_id, goods_name, goods_desc, goods_img, goods_spec_name, goods_count, ",
"refund_order, return_total_price, refund_price, refund_gold, refund_remark, ",
"refund_status, refund_fail_reason, create_time, update_time, ext_1, ext_2, ext_3, ",
"ext_4, ext_5, ext_6",
"from high_order_refund",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="order_child_id", property="orderChildId", jdbcType=JdbcType.BIGINT),
@Result(column="order_child_no", property="orderChildNo", 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="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_desc", property="goodsDesc", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_img", property="goodsImg", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_spec_name", property="goodsSpecName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_count", property="goodsCount", jdbcType=JdbcType.INTEGER),
@Result(column="refund_order", property="refundOrder", jdbcType=JdbcType.VARCHAR),
@Result(column="return_total_price", property="returnTotalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_gold", property="refundGold", jdbcType=JdbcType.INTEGER),
@Result(column="refund_remark", property="refundRemark", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_status", property="refundStatus", jdbcType=JdbcType.INTEGER),
@Result(column="refund_fail_reason", property="refundFailReason", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@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),
@Result(column="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_5", property="ext5", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_6", property="ext6", jdbcType=JdbcType.VARCHAR)
})
HighOrderRefund selectByPrimaryKey(Long id);
@UpdateProvider(type=HighOrderRefundSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighOrderRefund record, @Param("example") HighOrderRefundExample example);
@UpdateProvider(type=HighOrderRefundSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighOrderRefund record, @Param("example") HighOrderRefundExample example);
@UpdateProvider(type=HighOrderRefundSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighOrderRefund record);
@Update({
"update high_order_refund",
"set order_id = #{orderId,jdbcType=BIGINT},",
"order_no = #{orderNo,jdbcType=VARCHAR},",
"order_child_id = #{orderChildId,jdbcType=BIGINT},",
"order_child_no = #{orderChildNo,jdbcType=VARCHAR},",
"mem_id = #{memId,jdbcType=BIGINT},",
"mem_name = #{memName,jdbcType=VARCHAR},",
"mem_phone = #{memPhone,jdbcType=VARCHAR},",
"goods_type = #{goodsType,jdbcType=INTEGER},",
"goods_id = #{goodsId,jdbcType=BIGINT},",
"goods_name = #{goodsName,jdbcType=VARCHAR},",
"goods_desc = #{goodsDesc,jdbcType=VARCHAR},",
"goods_img = #{goodsImg,jdbcType=VARCHAR},",
"goods_spec_name = #{goodsSpecName,jdbcType=VARCHAR},",
"goods_count = #{goodsCount,jdbcType=INTEGER},",
"refund_order = #{refundOrder,jdbcType=VARCHAR},",
"return_total_price = #{returnTotalPrice,jdbcType=DECIMAL},",
"refund_price = #{refundPrice,jdbcType=DECIMAL},",
"refund_gold = #{refundGold,jdbcType=INTEGER},",
"refund_remark = #{refundRemark,jdbcType=VARCHAR},",
"refund_status = #{refundStatus,jdbcType=INTEGER},",
"refund_fail_reason = #{refundFailReason,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR},",
"ext_4 = #{ext4,jdbcType=VARCHAR},",
"ext_5 = #{ext5,jdbcType=VARCHAR},",
"ext_6 = #{ext6,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighOrderRefund record);
}

@ -0,0 +1,7 @@
package com.hai.dao;
/**
* mapper扩展类
*/
public interface HighOrderRefundMapperExt {
}

@ -0,0 +1,584 @@
package com.hai.dao;
import com.hai.entity.HighOrderRefund;
import com.hai.entity.HighOrderRefundExample.Criteria;
import com.hai.entity.HighOrderRefundExample.Criterion;
import com.hai.entity.HighOrderRefundExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighOrderRefundSqlProvider {
public String countByExample(HighOrderRefundExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_order_refund");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighOrderRefundExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_order_refund");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighOrderRefund record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_order_refund");
if (record.getOrderId() != null) {
sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}");
}
if (record.getOrderChildId() != null) {
sql.VALUES("order_child_id", "#{orderChildId,jdbcType=BIGINT}");
}
if (record.getOrderChildNo() != null) {
sql.VALUES("order_child_no", "#{orderChildNo,jdbcType=VARCHAR}");
}
if (record.getMemId() != null) {
sql.VALUES("mem_id", "#{memId,jdbcType=BIGINT}");
}
if (record.getMemName() != null) {
sql.VALUES("mem_name", "#{memName,jdbcType=VARCHAR}");
}
if (record.getMemPhone() != null) {
sql.VALUES("mem_phone", "#{memPhone,jdbcType=VARCHAR}");
}
if (record.getGoodsType() != null) {
sql.VALUES("goods_type", "#{goodsType,jdbcType=INTEGER}");
}
if (record.getGoodsId() != null) {
sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}");
}
if (record.getGoodsName() != null) {
sql.VALUES("goods_name", "#{goodsName,jdbcType=VARCHAR}");
}
if (record.getGoodsDesc() != null) {
sql.VALUES("goods_desc", "#{goodsDesc,jdbcType=VARCHAR}");
}
if (record.getGoodsImg() != null) {
sql.VALUES("goods_img", "#{goodsImg,jdbcType=VARCHAR}");
}
if (record.getGoodsSpecName() != null) {
sql.VALUES("goods_spec_name", "#{goodsSpecName,jdbcType=VARCHAR}");
}
if (record.getGoodsCount() != null) {
sql.VALUES("goods_count", "#{goodsCount,jdbcType=INTEGER}");
}
if (record.getRefundOrder() != null) {
sql.VALUES("refund_order", "#{refundOrder,jdbcType=VARCHAR}");
}
if (record.getReturnTotalPrice() != null) {
sql.VALUES("return_total_price", "#{returnTotalPrice,jdbcType=DECIMAL}");
}
if (record.getRefundPrice() != null) {
sql.VALUES("refund_price", "#{refundPrice,jdbcType=DECIMAL}");
}
if (record.getRefundGold() != null) {
sql.VALUES("refund_gold", "#{refundGold,jdbcType=INTEGER}");
}
if (record.getRefundRemark() != null) {
sql.VALUES("refund_remark", "#{refundRemark,jdbcType=VARCHAR}");
}
if (record.getRefundStatus() != null) {
sql.VALUES("refund_status", "#{refundStatus,jdbcType=INTEGER}");
}
if (record.getRefundFailReason() != null) {
sql.VALUES("refund_fail_reason", "#{refundFailReason,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
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}");
}
if (record.getExt4() != null) {
sql.VALUES("ext_4", "#{ext4,jdbcType=VARCHAR}");
}
if (record.getExt5() != null) {
sql.VALUES("ext_5", "#{ext5,jdbcType=VARCHAR}");
}
if (record.getExt6() != null) {
sql.VALUES("ext_6", "#{ext6,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(HighOrderRefundExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("order_id");
sql.SELECT("order_no");
sql.SELECT("order_child_id");
sql.SELECT("order_child_no");
sql.SELECT("mem_id");
sql.SELECT("mem_name");
sql.SELECT("mem_phone");
sql.SELECT("goods_type");
sql.SELECT("goods_id");
sql.SELECT("goods_name");
sql.SELECT("goods_desc");
sql.SELECT("goods_img");
sql.SELECT("goods_spec_name");
sql.SELECT("goods_count");
sql.SELECT("refund_order");
sql.SELECT("return_total_price");
sql.SELECT("refund_price");
sql.SELECT("refund_gold");
sql.SELECT("refund_remark");
sql.SELECT("refund_status");
sql.SELECT("refund_fail_reason");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.SELECT("ext_4");
sql.SELECT("ext_5");
sql.SELECT("ext_6");
sql.FROM("high_order_refund");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
HighOrderRefund record = (HighOrderRefund) parameter.get("record");
HighOrderRefundExample example = (HighOrderRefundExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_order_refund");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getOrderId() != null) {
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
}
if (record.getOrderChildId() != null) {
sql.SET("order_child_id = #{record.orderChildId,jdbcType=BIGINT}");
}
if (record.getOrderChildNo() != null) {
sql.SET("order_child_no = #{record.orderChildNo,jdbcType=VARCHAR}");
}
if (record.getMemId() != null) {
sql.SET("mem_id = #{record.memId,jdbcType=BIGINT}");
}
if (record.getMemName() != null) {
sql.SET("mem_name = #{record.memName,jdbcType=VARCHAR}");
}
if (record.getMemPhone() != null) {
sql.SET("mem_phone = #{record.memPhone,jdbcType=VARCHAR}");
}
if (record.getGoodsType() != null) {
sql.SET("goods_type = #{record.goodsType,jdbcType=INTEGER}");
}
if (record.getGoodsId() != null) {
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}");
}
if (record.getGoodsName() != null) {
sql.SET("goods_name = #{record.goodsName,jdbcType=VARCHAR}");
}
if (record.getGoodsDesc() != null) {
sql.SET("goods_desc = #{record.goodsDesc,jdbcType=VARCHAR}");
}
if (record.getGoodsImg() != null) {
sql.SET("goods_img = #{record.goodsImg,jdbcType=VARCHAR}");
}
if (record.getGoodsSpecName() != null) {
sql.SET("goods_spec_name = #{record.goodsSpecName,jdbcType=VARCHAR}");
}
if (record.getGoodsCount() != null) {
sql.SET("goods_count = #{record.goodsCount,jdbcType=INTEGER}");
}
if (record.getRefundOrder() != null) {
sql.SET("refund_order = #{record.refundOrder,jdbcType=VARCHAR}");
}
if (record.getReturnTotalPrice() != null) {
sql.SET("return_total_price = #{record.returnTotalPrice,jdbcType=DECIMAL}");
}
if (record.getRefundPrice() != null) {
sql.SET("refund_price = #{record.refundPrice,jdbcType=DECIMAL}");
}
if (record.getRefundGold() != null) {
sql.SET("refund_gold = #{record.refundGold,jdbcType=INTEGER}");
}
if (record.getRefundRemark() != null) {
sql.SET("refund_remark = #{record.refundRemark,jdbcType=VARCHAR}");
}
if (record.getRefundStatus() != null) {
sql.SET("refund_status = #{record.refundStatus,jdbcType=INTEGER}");
}
if (record.getRefundFailReason() != null) {
sql.SET("refund_fail_reason = #{record.refundFailReason,jdbcType=VARCHAR}");
}
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.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}");
}
if (record.getExt4() != null) {
sql.SET("ext_4 = #{record.ext4,jdbcType=VARCHAR}");
}
if (record.getExt5() != null) {
sql.SET("ext_5 = #{record.ext5,jdbcType=VARCHAR}");
}
if (record.getExt6() != null) {
sql.SET("ext_6 = #{record.ext6,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("high_order_refund");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
sql.SET("order_child_id = #{record.orderChildId,jdbcType=BIGINT}");
sql.SET("order_child_no = #{record.orderChildNo,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("goods_type = #{record.goodsType,jdbcType=INTEGER}");
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}");
sql.SET("goods_name = #{record.goodsName,jdbcType=VARCHAR}");
sql.SET("goods_desc = #{record.goodsDesc,jdbcType=VARCHAR}");
sql.SET("goods_img = #{record.goodsImg,jdbcType=VARCHAR}");
sql.SET("goods_spec_name = #{record.goodsSpecName,jdbcType=VARCHAR}");
sql.SET("goods_count = #{record.goodsCount,jdbcType=INTEGER}");
sql.SET("refund_order = #{record.refundOrder,jdbcType=VARCHAR}");
sql.SET("return_total_price = #{record.returnTotalPrice,jdbcType=DECIMAL}");
sql.SET("refund_price = #{record.refundPrice,jdbcType=DECIMAL}");
sql.SET("refund_gold = #{record.refundGold,jdbcType=INTEGER}");
sql.SET("refund_remark = #{record.refundRemark,jdbcType=VARCHAR}");
sql.SET("refund_status = #{record.refundStatus,jdbcType=INTEGER}");
sql.SET("refund_fail_reason = #{record.refundFailReason,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
sql.SET("ext_4 = #{record.ext4,jdbcType=VARCHAR}");
sql.SET("ext_5 = #{record.ext5,jdbcType=VARCHAR}");
sql.SET("ext_6 = #{record.ext6,jdbcType=VARCHAR}");
HighOrderRefundExample example = (HighOrderRefundExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighOrderRefund record) {
SQL sql = new SQL();
sql.UPDATE("high_order_refund");
if (record.getOrderId() != null) {
sql.SET("order_id = #{orderId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}");
}
if (record.getOrderChildId() != null) {
sql.SET("order_child_id = #{orderChildId,jdbcType=BIGINT}");
}
if (record.getOrderChildNo() != null) {
sql.SET("order_child_no = #{orderChildNo,jdbcType=VARCHAR}");
}
if (record.getMemId() != null) {
sql.SET("mem_id = #{memId,jdbcType=BIGINT}");
}
if (record.getMemName() != null) {
sql.SET("mem_name = #{memName,jdbcType=VARCHAR}");
}
if (record.getMemPhone() != null) {
sql.SET("mem_phone = #{memPhone,jdbcType=VARCHAR}");
}
if (record.getGoodsType() != null) {
sql.SET("goods_type = #{goodsType,jdbcType=INTEGER}");
}
if (record.getGoodsId() != null) {
sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}");
}
if (record.getGoodsName() != null) {
sql.SET("goods_name = #{goodsName,jdbcType=VARCHAR}");
}
if (record.getGoodsDesc() != null) {
sql.SET("goods_desc = #{goodsDesc,jdbcType=VARCHAR}");
}
if (record.getGoodsImg() != null) {
sql.SET("goods_img = #{goodsImg,jdbcType=VARCHAR}");
}
if (record.getGoodsSpecName() != null) {
sql.SET("goods_spec_name = #{goodsSpecName,jdbcType=VARCHAR}");
}
if (record.getGoodsCount() != null) {
sql.SET("goods_count = #{goodsCount,jdbcType=INTEGER}");
}
if (record.getRefundOrder() != null) {
sql.SET("refund_order = #{refundOrder,jdbcType=VARCHAR}");
}
if (record.getReturnTotalPrice() != null) {
sql.SET("return_total_price = #{returnTotalPrice,jdbcType=DECIMAL}");
}
if (record.getRefundPrice() != null) {
sql.SET("refund_price = #{refundPrice,jdbcType=DECIMAL}");
}
if (record.getRefundGold() != null) {
sql.SET("refund_gold = #{refundGold,jdbcType=INTEGER}");
}
if (record.getRefundRemark() != null) {
sql.SET("refund_remark = #{refundRemark,jdbcType=VARCHAR}");
}
if (record.getRefundStatus() != null) {
sql.SET("refund_status = #{refundStatus,jdbcType=INTEGER}");
}
if (record.getRefundFailReason() != null) {
sql.SET("refund_fail_reason = #{refundFailReason,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
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}");
}
if (record.getExt4() != null) {
sql.SET("ext_4 = #{ext4,jdbcType=VARCHAR}");
}
if (record.getExt5() != null) {
sql.SET("ext_5 = #{ext5,jdbcType=VARCHAR}");
}
if (record.getExt6() != null) {
sql.SET("ext_6 = #{ext6,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, HighOrderRefundExample 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<Criteria> 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<Criterion> 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());
}
}
}

@ -160,6 +160,10 @@ public class HighOrderSqlProvider {
sql.VALUES("cancel_remarks", "#{cancelRemarks,jdbcType=VARCHAR}");
}
if (record.getRefundTime() != null) {
sql.VALUES("refund_time", "#{refundTime,jdbcType=TIMESTAMP}");
}
if (record.getAccountMerchantNum() != null) {
sql.VALUES("account_merchant_num", "#{accountMerchantNum,jdbcType=VARCHAR}");
}
@ -255,6 +259,7 @@ public class HighOrderSqlProvider {
sql.SELECT("finish_time");
sql.SELECT("cancel_time");
sql.SELECT("cancel_remarks");
sql.SELECT("refund_time");
sql.SELECT("account_merchant_num");
sql.SELECT("profit_sharing_status");
sql.SELECT("profit_sharing_record_id");
@ -421,6 +426,10 @@ public class HighOrderSqlProvider {
sql.SET("cancel_remarks = #{record.cancelRemarks,jdbcType=VARCHAR}");
}
if (record.getRefundTime() != null) {
sql.SET("refund_time = #{record.refundTime,jdbcType=TIMESTAMP}");
}
if (record.getAccountMerchantNum() != null) {
sql.SET("account_merchant_num = #{record.accountMerchantNum,jdbcType=VARCHAR}");
}
@ -515,6 +524,7 @@ public class HighOrderSqlProvider {
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}");
sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}");
sql.SET("cancel_remarks = #{record.cancelRemarks,jdbcType=VARCHAR}");
sql.SET("refund_time = #{record.refundTime,jdbcType=TIMESTAMP}");
sql.SET("account_merchant_num = #{record.accountMerchantNum,jdbcType=VARCHAR}");
sql.SET("profit_sharing_status = #{record.profitSharingStatus,jdbcType=BIT}");
sql.SET("profit_sharing_record_id = #{record.profitSharingRecordId,jdbcType=BIGINT}");
@ -670,6 +680,10 @@ public class HighOrderSqlProvider {
sql.SET("cancel_remarks = #{cancelRemarks,jdbcType=VARCHAR}");
}
if (record.getRefundTime() != null) {
sql.SET("refund_time = #{refundTime,jdbcType=TIMESTAMP}");
}
if (record.getAccountMerchantNum() != null) {
sql.SET("account_merchant_num = #{accountMerchantNum,jdbcType=VARCHAR}");
}

@ -2,6 +2,7 @@ package com.hai.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* high_child_order
@ -23,11 +24,26 @@ public class HighChildOrder implements Serializable {
*/
private Long orderId;
/**
* 订单号
*/
private String orderNo;
/**
* 用户id
*/
private Long memId;
/**
* 用户昵称
*/
private String memName;
/**
* 用户手机号
*/
private String memPhone;
/**
* 子订单号
*/
@ -113,6 +129,21 @@ public class HighChildOrder implements Serializable {
*/
private Integer saleCount;
/**
* 剩余退款数量
*/
private Integer surplusRefundNum;
/**
* 剩余退款金额
*/
private BigDecimal surplusRefundPrice;
/**
* 剩余退款积分
*/
private Integer surplusRefundIntegral;
/**
* 渠道订单号
*/
@ -140,6 +171,36 @@ public class HighChildOrder implements Serializable {
*/
private Integer praiseStatus;
/**
* 创建时间
*/
private Date createTime;
/**
* 支付时间
*/
private Date payTime;
/**
* 完成时间
*/
private Date finishTime;
/**
* 退款时间
*/
private Date refundTime;
/**
* 退款备注
*/
private String refundRemarks;
/**
* 取消时间
*/
private Date cancelTime;
private String ext1;
private String ext2;
@ -170,6 +231,14 @@ public class HighChildOrder implements Serializable {
this.orderId = orderId;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public Long getMemId() {
return memId;
}
@ -178,6 +247,22 @@ public class HighChildOrder implements Serializable {
this.memId = memId;
}
public String getMemName() {
return memName;
}
public void setMemName(String memName) {
this.memName = memName;
}
public String getMemPhone() {
return memPhone;
}
public void setMemPhone(String memPhone) {
this.memPhone = memPhone;
}
public String getChildOrderNo() {
return childOrderNo;
}
@ -298,6 +383,30 @@ public class HighChildOrder implements Serializable {
this.saleCount = saleCount;
}
public Integer getSurplusRefundNum() {
return surplusRefundNum;
}
public void setSurplusRefundNum(Integer surplusRefundNum) {
this.surplusRefundNum = surplusRefundNum;
}
public BigDecimal getSurplusRefundPrice() {
return surplusRefundPrice;
}
public void setSurplusRefundPrice(BigDecimal surplusRefundPrice) {
this.surplusRefundPrice = surplusRefundPrice;
}
public Integer getSurplusRefundIntegral() {
return surplusRefundIntegral;
}
public void setSurplusRefundIntegral(Integer surplusRefundIntegral) {
this.surplusRefundIntegral = surplusRefundIntegral;
}
public String getChannelOrderNo() {
return channelOrderNo;
}
@ -330,6 +439,54 @@ public class HighChildOrder implements Serializable {
this.praiseStatus = praiseStatus;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getPayTime() {
return payTime;
}
public void setPayTime(Date payTime) {
this.payTime = payTime;
}
public Date getFinishTime() {
return finishTime;
}
public void setFinishTime(Date finishTime) {
this.finishTime = finishTime;
}
public Date getRefundTime() {
return refundTime;
}
public void setRefundTime(Date refundTime) {
this.refundTime = refundTime;
}
public String getRefundRemarks() {
return refundRemarks;
}
public void setRefundRemarks(String refundRemarks) {
this.refundRemarks = refundRemarks;
}
public Date getCancelTime() {
return cancelTime;
}
public void setCancelTime(Date cancelTime) {
this.cancelTime = cancelTime;
}
public String getExt1() {
return ext1;
}
@ -392,7 +549,10 @@ public class HighChildOrder implements Serializable {
HighChildOrder other = (HighChildOrder) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
&& (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.getChildOrderNo() == null ? other.getChildOrderNo() == null : this.getChildOrderNo().equals(other.getChildOrderNo()))
&& (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
&& (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName()))
@ -408,10 +568,19 @@ public class HighChildOrder implements Serializable {
&& (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
&& (this.getTotalActualPrice() == null ? other.getTotalActualPrice() == null : this.getTotalActualPrice().equals(other.getTotalActualPrice()))
&& (this.getSaleCount() == null ? other.getSaleCount() == null : this.getSaleCount().equals(other.getSaleCount()))
&& (this.getSurplusRefundNum() == null ? other.getSurplusRefundNum() == null : this.getSurplusRefundNum().equals(other.getSurplusRefundNum()))
&& (this.getSurplusRefundPrice() == null ? other.getSurplusRefundPrice() == null : this.getSurplusRefundPrice().equals(other.getSurplusRefundPrice()))
&& (this.getSurplusRefundIntegral() == null ? other.getSurplusRefundIntegral() == null : this.getSurplusRefundIntegral().equals(other.getSurplusRefundIntegral()))
&& (this.getChannelOrderNo() == null ? other.getChannelOrderNo() == null : this.getChannelOrderNo().equals(other.getChannelOrderNo()))
&& (this.getGiveawayType() == null ? other.getGiveawayType() == null : this.getGiveawayType().equals(other.getGiveawayType()))
&& (this.getChildOrderStatus() == null ? other.getChildOrderStatus() == null : this.getChildOrderStatus().equals(other.getChildOrderStatus()))
&& (this.getPraiseStatus() == null ? other.getPraiseStatus() == null : this.getPraiseStatus().equals(other.getPraiseStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
&& (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
&& (this.getRefundTime() == null ? other.getRefundTime() == null : this.getRefundTime().equals(other.getRefundTime()))
&& (this.getRefundRemarks() == null ? other.getRefundRemarks() == null : this.getRefundRemarks().equals(other.getRefundRemarks()))
&& (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime()))
&& (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()))
@ -426,7 +595,10 @@ public class HighChildOrder implements Serializable {
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
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 + ((getChildOrderNo() == null) ? 0 : getChildOrderNo().hashCode());
result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode());
@ -442,10 +614,19 @@ public class HighChildOrder implements Serializable {
result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
result = prime * result + ((getTotalActualPrice() == null) ? 0 : getTotalActualPrice().hashCode());
result = prime * result + ((getSaleCount() == null) ? 0 : getSaleCount().hashCode());
result = prime * result + ((getSurplusRefundNum() == null) ? 0 : getSurplusRefundNum().hashCode());
result = prime * result + ((getSurplusRefundPrice() == null) ? 0 : getSurplusRefundPrice().hashCode());
result = prime * result + ((getSurplusRefundIntegral() == null) ? 0 : getSurplusRefundIntegral().hashCode());
result = prime * result + ((getChannelOrderNo() == null) ? 0 : getChannelOrderNo().hashCode());
result = prime * result + ((getGiveawayType() == null) ? 0 : getGiveawayType().hashCode());
result = prime * result + ((getChildOrderStatus() == null) ? 0 : getChildOrderStatus().hashCode());
result = prime * result + ((getPraiseStatus() == null) ? 0 : getPraiseStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode());
result = prime * result + ((getRefundTime() == null) ? 0 : getRefundTime().hashCode());
result = prime * result + ((getRefundRemarks() == null) ? 0 : getRefundRemarks().hashCode());
result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().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());
@ -463,7 +644,10 @@ public class HighChildOrder implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", orderId=").append(orderId);
sb.append(", orderNo=").append(orderNo);
sb.append(", memId=").append(memId);
sb.append(", memName=").append(memName);
sb.append(", memPhone=").append(memPhone);
sb.append(", childOrderNo=").append(childOrderNo);
sb.append(", storeId=").append(storeId);
sb.append(", storeName=").append(storeName);
@ -479,10 +663,19 @@ public class HighChildOrder implements Serializable {
sb.append(", totalPrice=").append(totalPrice);
sb.append(", totalActualPrice=").append(totalActualPrice);
sb.append(", saleCount=").append(saleCount);
sb.append(", surplusRefundNum=").append(surplusRefundNum);
sb.append(", surplusRefundPrice=").append(surplusRefundPrice);
sb.append(", surplusRefundIntegral=").append(surplusRefundIntegral);
sb.append(", channelOrderNo=").append(channelOrderNo);
sb.append(", giveawayType=").append(giveawayType);
sb.append(", childOrderStatus=").append(childOrderStatus);
sb.append(", praiseStatus=").append(praiseStatus);
sb.append(", createTime=").append(createTime);
sb.append(", payTime=").append(payTime);
sb.append(", finishTime=").append(finishTime);
sb.append(", refundTime=").append(refundTime);
sb.append(", refundRemarks=").append(refundRemarks);
sb.append(", cancelTime=").append(cancelTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);

@ -2,6 +2,7 @@ package com.hai.entity;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class HighChildOrderExample {
@ -245,6 +246,76 @@ public class HighChildOrderExample {
return (Criteria) this;
}
public Criteria andOrderNoIsNull() {
addCriterion("order_no is null");
return (Criteria) this;
}
public Criteria andOrderNoIsNotNull() {
addCriterion("order_no is not null");
return (Criteria) this;
}
public Criteria andOrderNoEqualTo(String value) {
addCriterion("order_no =", value, "orderNo");
return (Criteria) this;
}
public Criteria andOrderNoNotEqualTo(String value) {
addCriterion("order_no <>", value, "orderNo");
return (Criteria) this;
}
public Criteria andOrderNoGreaterThan(String value) {
addCriterion("order_no >", value, "orderNo");
return (Criteria) this;
}
public Criteria andOrderNoGreaterThanOrEqualTo(String value) {
addCriterion("order_no >=", value, "orderNo");
return (Criteria) this;
}
public Criteria andOrderNoLessThan(String value) {
addCriterion("order_no <", value, "orderNo");
return (Criteria) this;
}
public Criteria andOrderNoLessThanOrEqualTo(String value) {
addCriterion("order_no <=", value, "orderNo");
return (Criteria) this;
}
public Criteria andOrderNoLike(String value) {
addCriterion("order_no like", value, "orderNo");
return (Criteria) this;
}
public Criteria andOrderNoNotLike(String value) {
addCriterion("order_no not like", value, "orderNo");
return (Criteria) this;
}
public Criteria andOrderNoIn(List<String> values) {
addCriterion("order_no in", values, "orderNo");
return (Criteria) this;
}
public Criteria andOrderNoNotIn(List<String> values) {
addCriterion("order_no not in", values, "orderNo");
return (Criteria) this;
}
public Criteria andOrderNoBetween(String value1, String value2) {
addCriterion("order_no between", value1, value2, "orderNo");
return (Criteria) this;
}
public Criteria andOrderNoNotBetween(String value1, String value2) {
addCriterion("order_no not between", value1, value2, "orderNo");
return (Criteria) this;
}
public Criteria andMemIdIsNull() {
addCriterion("mem_id is null");
return (Criteria) this;
@ -305,6 +376,146 @@ public class HighChildOrderExample {
return (Criteria) this;
}
public Criteria andMemNameIsNull() {
addCriterion("mem_name is null");
return (Criteria) this;
}
public Criteria andMemNameIsNotNull() {
addCriterion("mem_name is not null");
return (Criteria) this;
}
public Criteria andMemNameEqualTo(String value) {
addCriterion("mem_name =", value, "memName");
return (Criteria) this;
}
public Criteria andMemNameNotEqualTo(String value) {
addCriterion("mem_name <>", value, "memName");
return (Criteria) this;
}
public Criteria andMemNameGreaterThan(String value) {
addCriterion("mem_name >", value, "memName");
return (Criteria) this;
}
public Criteria andMemNameGreaterThanOrEqualTo(String value) {
addCriterion("mem_name >=", value, "memName");
return (Criteria) this;
}
public Criteria andMemNameLessThan(String value) {
addCriterion("mem_name <", value, "memName");
return (Criteria) this;
}
public Criteria andMemNameLessThanOrEqualTo(String value) {
addCriterion("mem_name <=", value, "memName");
return (Criteria) this;
}
public Criteria andMemNameLike(String value) {
addCriterion("mem_name like", value, "memName");
return (Criteria) this;
}
public Criteria andMemNameNotLike(String value) {
addCriterion("mem_name not like", value, "memName");
return (Criteria) this;
}
public Criteria andMemNameIn(List<String> values) {
addCriterion("mem_name in", values, "memName");
return (Criteria) this;
}
public Criteria andMemNameNotIn(List<String> values) {
addCriterion("mem_name not in", values, "memName");
return (Criteria) this;
}
public Criteria andMemNameBetween(String value1, String value2) {
addCriterion("mem_name between", value1, value2, "memName");
return (Criteria) this;
}
public Criteria andMemNameNotBetween(String value1, String value2) {
addCriterion("mem_name not between", value1, value2, "memName");
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<String> values) {
addCriterion("mem_phone in", values, "memPhone");
return (Criteria) this;
}
public Criteria andMemPhoneNotIn(List<String> 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 andChildOrderNoIsNull() {
addCriterion("child_order_no is null");
return (Criteria) this;
@ -1275,6 +1486,186 @@ public class HighChildOrderExample {
return (Criteria) this;
}
public Criteria andSurplusRefundNumIsNull() {
addCriterion("surplus_refund_num is null");
return (Criteria) this;
}
public Criteria andSurplusRefundNumIsNotNull() {
addCriterion("surplus_refund_num is not null");
return (Criteria) this;
}
public Criteria andSurplusRefundNumEqualTo(Integer value) {
addCriterion("surplus_refund_num =", value, "surplusRefundNum");
return (Criteria) this;
}
public Criteria andSurplusRefundNumNotEqualTo(Integer value) {
addCriterion("surplus_refund_num <>", value, "surplusRefundNum");
return (Criteria) this;
}
public Criteria andSurplusRefundNumGreaterThan(Integer value) {
addCriterion("surplus_refund_num >", value, "surplusRefundNum");
return (Criteria) this;
}
public Criteria andSurplusRefundNumGreaterThanOrEqualTo(Integer value) {
addCriterion("surplus_refund_num >=", value, "surplusRefundNum");
return (Criteria) this;
}
public Criteria andSurplusRefundNumLessThan(Integer value) {
addCriterion("surplus_refund_num <", value, "surplusRefundNum");
return (Criteria) this;
}
public Criteria andSurplusRefundNumLessThanOrEqualTo(Integer value) {
addCriterion("surplus_refund_num <=", value, "surplusRefundNum");
return (Criteria) this;
}
public Criteria andSurplusRefundNumIn(List<Integer> values) {
addCriterion("surplus_refund_num in", values, "surplusRefundNum");
return (Criteria) this;
}
public Criteria andSurplusRefundNumNotIn(List<Integer> values) {
addCriterion("surplus_refund_num not in", values, "surplusRefundNum");
return (Criteria) this;
}
public Criteria andSurplusRefundNumBetween(Integer value1, Integer value2) {
addCriterion("surplus_refund_num between", value1, value2, "surplusRefundNum");
return (Criteria) this;
}
public Criteria andSurplusRefundNumNotBetween(Integer value1, Integer value2) {
addCriterion("surplus_refund_num not between", value1, value2, "surplusRefundNum");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceIsNull() {
addCriterion("surplus_refund_price is null");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceIsNotNull() {
addCriterion("surplus_refund_price is not null");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceEqualTo(BigDecimal value) {
addCriterion("surplus_refund_price =", value, "surplusRefundPrice");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceNotEqualTo(BigDecimal value) {
addCriterion("surplus_refund_price <>", value, "surplusRefundPrice");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceGreaterThan(BigDecimal value) {
addCriterion("surplus_refund_price >", value, "surplusRefundPrice");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("surplus_refund_price >=", value, "surplusRefundPrice");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceLessThan(BigDecimal value) {
addCriterion("surplus_refund_price <", value, "surplusRefundPrice");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("surplus_refund_price <=", value, "surplusRefundPrice");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceIn(List<BigDecimal> values) {
addCriterion("surplus_refund_price in", values, "surplusRefundPrice");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceNotIn(List<BigDecimal> values) {
addCriterion("surplus_refund_price not in", values, "surplusRefundPrice");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("surplus_refund_price between", value1, value2, "surplusRefundPrice");
return (Criteria) this;
}
public Criteria andSurplusRefundPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("surplus_refund_price not between", value1, value2, "surplusRefundPrice");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralIsNull() {
addCriterion("surplus_refund_integral is null");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralIsNotNull() {
addCriterion("surplus_refund_integral is not null");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralEqualTo(Integer value) {
addCriterion("surplus_refund_integral =", value, "surplusRefundIntegral");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralNotEqualTo(Integer value) {
addCriterion("surplus_refund_integral <>", value, "surplusRefundIntegral");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralGreaterThan(Integer value) {
addCriterion("surplus_refund_integral >", value, "surplusRefundIntegral");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralGreaterThanOrEqualTo(Integer value) {
addCriterion("surplus_refund_integral >=", value, "surplusRefundIntegral");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralLessThan(Integer value) {
addCriterion("surplus_refund_integral <", value, "surplusRefundIntegral");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralLessThanOrEqualTo(Integer value) {
addCriterion("surplus_refund_integral <=", value, "surplusRefundIntegral");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralIn(List<Integer> values) {
addCriterion("surplus_refund_integral in", values, "surplusRefundIntegral");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralNotIn(List<Integer> values) {
addCriterion("surplus_refund_integral not in", values, "surplusRefundIntegral");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralBetween(Integer value1, Integer value2) {
addCriterion("surplus_refund_integral between", value1, value2, "surplusRefundIntegral");
return (Criteria) this;
}
public Criteria andSurplusRefundIntegralNotBetween(Integer value1, Integer value2) {
addCriterion("surplus_refund_integral not between", value1, value2, "surplusRefundIntegral");
return (Criteria) this;
}
public Criteria andChannelOrderNoIsNull() {
addCriterion("channel_order_no is null");
return (Criteria) this;
@ -1525,6 +1916,376 @@ public class HighChildOrderExample {
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<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> 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 andPayTimeIsNull() {
addCriterion("pay_time is null");
return (Criteria) this;
}
public Criteria andPayTimeIsNotNull() {
addCriterion("pay_time is not null");
return (Criteria) this;
}
public Criteria andPayTimeEqualTo(Date value) {
addCriterion("pay_time =", value, "payTime");
return (Criteria) this;
}
public Criteria andPayTimeNotEqualTo(Date value) {
addCriterion("pay_time <>", value, "payTime");
return (Criteria) this;
}
public Criteria andPayTimeGreaterThan(Date value) {
addCriterion("pay_time >", value, "payTime");
return (Criteria) this;
}
public Criteria andPayTimeGreaterThanOrEqualTo(Date value) {
addCriterion("pay_time >=", value, "payTime");
return (Criteria) this;
}
public Criteria andPayTimeLessThan(Date value) {
addCriterion("pay_time <", value, "payTime");
return (Criteria) this;
}
public Criteria andPayTimeLessThanOrEqualTo(Date value) {
addCriterion("pay_time <=", value, "payTime");
return (Criteria) this;
}
public Criteria andPayTimeIn(List<Date> values) {
addCriterion("pay_time in", values, "payTime");
return (Criteria) this;
}
public Criteria andPayTimeNotIn(List<Date> values) {
addCriterion("pay_time not in", values, "payTime");
return (Criteria) this;
}
public Criteria andPayTimeBetween(Date value1, Date value2) {
addCriterion("pay_time between", value1, value2, "payTime");
return (Criteria) this;
}
public Criteria andPayTimeNotBetween(Date value1, Date value2) {
addCriterion("pay_time not between", value1, value2, "payTime");
return (Criteria) this;
}
public Criteria andFinishTimeIsNull() {
addCriterion("finish_time is null");
return (Criteria) this;
}
public Criteria andFinishTimeIsNotNull() {
addCriterion("finish_time is not null");
return (Criteria) this;
}
public Criteria andFinishTimeEqualTo(Date value) {
addCriterion("finish_time =", value, "finishTime");
return (Criteria) this;
}
public Criteria andFinishTimeNotEqualTo(Date value) {
addCriterion("finish_time <>", value, "finishTime");
return (Criteria) this;
}
public Criteria andFinishTimeGreaterThan(Date value) {
addCriterion("finish_time >", value, "finishTime");
return (Criteria) this;
}
public Criteria andFinishTimeGreaterThanOrEqualTo(Date value) {
addCriterion("finish_time >=", value, "finishTime");
return (Criteria) this;
}
public Criteria andFinishTimeLessThan(Date value) {
addCriterion("finish_time <", value, "finishTime");
return (Criteria) this;
}
public Criteria andFinishTimeLessThanOrEqualTo(Date value) {
addCriterion("finish_time <=", value, "finishTime");
return (Criteria) this;
}
public Criteria andFinishTimeIn(List<Date> values) {
addCriterion("finish_time in", values, "finishTime");
return (Criteria) this;
}
public Criteria andFinishTimeNotIn(List<Date> values) {
addCriterion("finish_time not in", values, "finishTime");
return (Criteria) this;
}
public Criteria andFinishTimeBetween(Date value1, Date value2) {
addCriterion("finish_time between", value1, value2, "finishTime");
return (Criteria) this;
}
public Criteria andFinishTimeNotBetween(Date value1, Date value2) {
addCriterion("finish_time not between", value1, value2, "finishTime");
return (Criteria) this;
}
public Criteria andRefundTimeIsNull() {
addCriterion("refund_time is null");
return (Criteria) this;
}
public Criteria andRefundTimeIsNotNull() {
addCriterion("refund_time is not null");
return (Criteria) this;
}
public Criteria andRefundTimeEqualTo(Date value) {
addCriterion("refund_time =", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeNotEqualTo(Date value) {
addCriterion("refund_time <>", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeGreaterThan(Date value) {
addCriterion("refund_time >", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeGreaterThanOrEqualTo(Date value) {
addCriterion("refund_time >=", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeLessThan(Date value) {
addCriterion("refund_time <", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeLessThanOrEqualTo(Date value) {
addCriterion("refund_time <=", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeIn(List<Date> values) {
addCriterion("refund_time in", values, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeNotIn(List<Date> values) {
addCriterion("refund_time not in", values, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeBetween(Date value1, Date value2) {
addCriterion("refund_time between", value1, value2, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeNotBetween(Date value1, Date value2) {
addCriterion("refund_time not between", value1, value2, "refundTime");
return (Criteria) this;
}
public Criteria andRefundRemarksIsNull() {
addCriterion("refund_remarks is null");
return (Criteria) this;
}
public Criteria andRefundRemarksIsNotNull() {
addCriterion("refund_remarks is not null");
return (Criteria) this;
}
public Criteria andRefundRemarksEqualTo(String value) {
addCriterion("refund_remarks =", value, "refundRemarks");
return (Criteria) this;
}
public Criteria andRefundRemarksNotEqualTo(String value) {
addCriterion("refund_remarks <>", value, "refundRemarks");
return (Criteria) this;
}
public Criteria andRefundRemarksGreaterThan(String value) {
addCriterion("refund_remarks >", value, "refundRemarks");
return (Criteria) this;
}
public Criteria andRefundRemarksGreaterThanOrEqualTo(String value) {
addCriterion("refund_remarks >=", value, "refundRemarks");
return (Criteria) this;
}
public Criteria andRefundRemarksLessThan(String value) {
addCriterion("refund_remarks <", value, "refundRemarks");
return (Criteria) this;
}
public Criteria andRefundRemarksLessThanOrEqualTo(String value) {
addCriterion("refund_remarks <=", value, "refundRemarks");
return (Criteria) this;
}
public Criteria andRefundRemarksLike(String value) {
addCriterion("refund_remarks like", value, "refundRemarks");
return (Criteria) this;
}
public Criteria andRefundRemarksNotLike(String value) {
addCriterion("refund_remarks not like", value, "refundRemarks");
return (Criteria) this;
}
public Criteria andRefundRemarksIn(List<String> values) {
addCriterion("refund_remarks in", values, "refundRemarks");
return (Criteria) this;
}
public Criteria andRefundRemarksNotIn(List<String> values) {
addCriterion("refund_remarks not in", values, "refundRemarks");
return (Criteria) this;
}
public Criteria andRefundRemarksBetween(String value1, String value2) {
addCriterion("refund_remarks between", value1, value2, "refundRemarks");
return (Criteria) this;
}
public Criteria andRefundRemarksNotBetween(String value1, String value2) {
addCriterion("refund_remarks not between", value1, value2, "refundRemarks");
return (Criteria) this;
}
public Criteria andCancelTimeIsNull() {
addCriterion("cancel_time is null");
return (Criteria) this;
}
public Criteria andCancelTimeIsNotNull() {
addCriterion("cancel_time is not null");
return (Criteria) this;
}
public Criteria andCancelTimeEqualTo(Date value) {
addCriterion("cancel_time =", value, "cancelTime");
return (Criteria) this;
}
public Criteria andCancelTimeNotEqualTo(Date value) {
addCriterion("cancel_time <>", value, "cancelTime");
return (Criteria) this;
}
public Criteria andCancelTimeGreaterThan(Date value) {
addCriterion("cancel_time >", value, "cancelTime");
return (Criteria) this;
}
public Criteria andCancelTimeGreaterThanOrEqualTo(Date value) {
addCriterion("cancel_time >=", value, "cancelTime");
return (Criteria) this;
}
public Criteria andCancelTimeLessThan(Date value) {
addCriterion("cancel_time <", value, "cancelTime");
return (Criteria) this;
}
public Criteria andCancelTimeLessThanOrEqualTo(Date value) {
addCriterion("cancel_time <=", value, "cancelTime");
return (Criteria) this;
}
public Criteria andCancelTimeIn(List<Date> values) {
addCriterion("cancel_time in", values, "cancelTime");
return (Criteria) this;
}
public Criteria andCancelTimeNotIn(List<Date> values) {
addCriterion("cancel_time not in", values, "cancelTime");
return (Criteria) this;
}
public Criteria andCancelTimeBetween(Date value1, Date value2) {
addCriterion("cancel_time between", value1, value2, "cancelTime");
return (Criteria) this;
}
public Criteria andCancelTimeNotBetween(Date value1, Date value2) {
addCriterion("cancel_time not between", value1, value2, "cancelTime");
return (Criteria) this;
}
public Criteria andExt1IsNull() {
addCriterion("ext_1 is null");
return (Criteria) this;

@ -194,6 +194,11 @@ public class HighOrder implements Serializable {
*/
private String cancelRemarks;
/**
* 退款时间
*/
private Date refundTime;
/**
* 入账商户号
*/
@ -525,6 +530,14 @@ public class HighOrder implements Serializable {
this.cancelRemarks = cancelRemarks;
}
public Date getRefundTime() {
return refundTime;
}
public void setRefundTime(Date refundTime) {
this.refundTime = refundTime;
}
public String getAccountMerchantNum() {
return accountMerchantNum;
}
@ -675,6 +688,7 @@ public class HighOrder implements Serializable {
&& (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
&& (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime()))
&& (this.getCancelRemarks() == null ? other.getCancelRemarks() == null : this.getCancelRemarks().equals(other.getCancelRemarks()))
&& (this.getRefundTime() == null ? other.getRefundTime() == null : this.getRefundTime().equals(other.getRefundTime()))
&& (this.getAccountMerchantNum() == null ? other.getAccountMerchantNum() == null : this.getAccountMerchantNum().equals(other.getAccountMerchantNum()))
&& (this.getProfitSharingStatus() == null ? other.getProfitSharingStatus() == null : this.getProfitSharingStatus().equals(other.getProfitSharingStatus()))
&& (this.getProfitSharingRecordId() == null ? other.getProfitSharingRecordId() == null : this.getProfitSharingRecordId().equals(other.getProfitSharingRecordId()))
@ -728,6 +742,7 @@ public class HighOrder implements Serializable {
result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode());
result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().hashCode());
result = prime * result + ((getCancelRemarks() == null) ? 0 : getCancelRemarks().hashCode());
result = prime * result + ((getRefundTime() == null) ? 0 : getRefundTime().hashCode());
result = prime * result + ((getAccountMerchantNum() == null) ? 0 : getAccountMerchantNum().hashCode());
result = prime * result + ((getProfitSharingStatus() == null) ? 0 : getProfitSharingStatus().hashCode());
result = prime * result + ((getProfitSharingRecordId() == null) ? 0 : getProfitSharingRecordId().hashCode());
@ -784,6 +799,7 @@ public class HighOrder implements Serializable {
sb.append(", finishTime=").append(finishTime);
sb.append(", cancelTime=").append(cancelTime);
sb.append(", cancelRemarks=").append(cancelRemarks);
sb.append(", refundTime=").append(refundTime);
sb.append(", accountMerchantNum=").append(accountMerchantNum);
sb.append(", profitSharingStatus=").append(profitSharingStatus);
sb.append(", profitSharingRecordId=").append(profitSharingRecordId);

@ -2286,6 +2286,66 @@ public class HighOrderExample {
return (Criteria) this;
}
public Criteria andRefundTimeIsNull() {
addCriterion("refund_time is null");
return (Criteria) this;
}
public Criteria andRefundTimeIsNotNull() {
addCriterion("refund_time is not null");
return (Criteria) this;
}
public Criteria andRefundTimeEqualTo(Date value) {
addCriterion("refund_time =", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeNotEqualTo(Date value) {
addCriterion("refund_time <>", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeGreaterThan(Date value) {
addCriterion("refund_time >", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeGreaterThanOrEqualTo(Date value) {
addCriterion("refund_time >=", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeLessThan(Date value) {
addCriterion("refund_time <", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeLessThanOrEqualTo(Date value) {
addCriterion("refund_time <=", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeIn(List<Date> values) {
addCriterion("refund_time in", values, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeNotIn(List<Date> values) {
addCriterion("refund_time not in", values, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeBetween(Date value1, Date value2) {
addCriterion("refund_time between", value1, value2, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeNotBetween(Date value1, Date value2) {
addCriterion("refund_time not between", value1, value2, "refundTime");
return (Criteria) this;
}
public Criteria andAccountMerchantNumIsNull() {
addCriterion("account_merchant_num is null");
return (Criteria) this;

@ -0,0 +1,525 @@
package com.hai.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* high_order_refund
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighOrderRefund implements Serializable {
/**
* 主键ID
*/
private Long id;
/**
* 交易订单id
*/
private Long orderId;
/**
* 交易订单号
*/
private String orderNo;
/**
* 子订单id
*/
private Long orderChildId;
/**
* 子订单号
*/
private String orderChildNo;
/**
* 用户表ID
*/
private Long memId;
/**
* 用户名称
*/
private String memName;
/**
* 用户电话
*/
private String memPhone;
/**
* 商品类型
1. 卡卷
2. 积分充值
3. 加油订单
4. KFC
5. 电影票
6. 话费充值
7. 优惠卷包
8. 汇联通充值
9. 星巴克
10. 第三方充值
*/
private Integer goodsType;
/**
* 商品id
*/
private Long goodsId;
/**
* 商品的名称
*/
private String goodsName;
/**
* 商品描述
*/
private String goodsDesc;
/**
* 商品图片
*/
private String goodsImg;
/**
* 商品规格名称
*/
private String goodsSpecName;
/**
* 商品数量
*/
private Integer goodsCount;
/**
* 退款订单号
*/
private String refundOrder;
/**
* 退款总金额
*/
private BigDecimal returnTotalPrice;
/**
* 退款金额
*/
private BigDecimal refundPrice;
/**
* 退款积分
*/
private Integer refundGold;
/**
* 退款备注
*/
private String refundRemark;
/**
* 退款状态
1. 退款中
2. 退款成功
3. 退款失败
*/
private Integer refundStatus;
/**
* 退款失败原因
*/
private String refundFailReason;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
private String ext1;
private String ext2;
private String ext3;
private String ext4;
private String ext5;
private String ext6;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public Long getOrderChildId() {
return orderChildId;
}
public void setOrderChildId(Long orderChildId) {
this.orderChildId = orderChildId;
}
public String getOrderChildNo() {
return orderChildNo;
}
public void setOrderChildNo(String orderChildNo) {
this.orderChildNo = orderChildNo;
}
public Long getMemId() {
return memId;
}
public void setMemId(Long memId) {
this.memId = memId;
}
public String getMemName() {
return memName;
}
public void setMemName(String memName) {
this.memName = memName;
}
public String getMemPhone() {
return memPhone;
}
public void setMemPhone(String memPhone) {
this.memPhone = memPhone;
}
public Integer getGoodsType() {
return goodsType;
}
public void setGoodsType(Integer goodsType) {
this.goodsType = goodsType;
}
public Long getGoodsId() {
return goodsId;
}
public void setGoodsId(Long goodsId) {
this.goodsId = goodsId;
}
public String getGoodsName() {
return goodsName;
}
public void setGoodsName(String goodsName) {
this.goodsName = goodsName;
}
public String getGoodsDesc() {
return goodsDesc;
}
public void setGoodsDesc(String goodsDesc) {
this.goodsDesc = goodsDesc;
}
public String getGoodsImg() {
return goodsImg;
}
public void setGoodsImg(String goodsImg) {
this.goodsImg = goodsImg;
}
public String getGoodsSpecName() {
return goodsSpecName;
}
public void setGoodsSpecName(String goodsSpecName) {
this.goodsSpecName = goodsSpecName;
}
public Integer getGoodsCount() {
return goodsCount;
}
public void setGoodsCount(Integer goodsCount) {
this.goodsCount = goodsCount;
}
public String getRefundOrder() {
return refundOrder;
}
public void setRefundOrder(String refundOrder) {
this.refundOrder = refundOrder;
}
public BigDecimal getReturnTotalPrice() {
return returnTotalPrice;
}
public void setReturnTotalPrice(BigDecimal returnTotalPrice) {
this.returnTotalPrice = returnTotalPrice;
}
public BigDecimal getRefundPrice() {
return refundPrice;
}
public void setRefundPrice(BigDecimal refundPrice) {
this.refundPrice = refundPrice;
}
public Integer getRefundGold() {
return refundGold;
}
public void setRefundGold(Integer refundGold) {
this.refundGold = refundGold;
}
public String getRefundRemark() {
return refundRemark;
}
public void setRefundRemark(String refundRemark) {
this.refundRemark = refundRemark;
}
public Integer getRefundStatus() {
return refundStatus;
}
public void setRefundStatus(Integer refundStatus) {
this.refundStatus = refundStatus;
}
public String getRefundFailReason() {
return refundFailReason;
}
public void setRefundFailReason(String refundFailReason) {
this.refundFailReason = refundFailReason;
}
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 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;
}
public String getExt4() {
return ext4;
}
public void setExt4(String ext4) {
this.ext4 = ext4;
}
public String getExt5() {
return ext5;
}
public void setExt5(String ext5) {
this.ext5 = ext5;
}
public String getExt6() {
return ext6;
}
public void setExt6(String ext6) {
this.ext6 = ext6;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
HighOrderRefund other = (HighOrderRefund) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
&& (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
&& (this.getOrderChildId() == null ? other.getOrderChildId() == null : this.getOrderChildId().equals(other.getOrderChildId()))
&& (this.getOrderChildNo() == null ? other.getOrderChildNo() == null : this.getOrderChildNo().equals(other.getOrderChildNo()))
&& (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.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType()))
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
&& (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
&& (this.getGoodsDesc() == null ? other.getGoodsDesc() == null : this.getGoodsDesc().equals(other.getGoodsDesc()))
&& (this.getGoodsImg() == null ? other.getGoodsImg() == null : this.getGoodsImg().equals(other.getGoodsImg()))
&& (this.getGoodsSpecName() == null ? other.getGoodsSpecName() == null : this.getGoodsSpecName().equals(other.getGoodsSpecName()))
&& (this.getGoodsCount() == null ? other.getGoodsCount() == null : this.getGoodsCount().equals(other.getGoodsCount()))
&& (this.getRefundOrder() == null ? other.getRefundOrder() == null : this.getRefundOrder().equals(other.getRefundOrder()))
&& (this.getReturnTotalPrice() == null ? other.getReturnTotalPrice() == null : this.getReturnTotalPrice().equals(other.getReturnTotalPrice()))
&& (this.getRefundPrice() == null ? other.getRefundPrice() == null : this.getRefundPrice().equals(other.getRefundPrice()))
&& (this.getRefundGold() == null ? other.getRefundGold() == null : this.getRefundGold().equals(other.getRefundGold()))
&& (this.getRefundRemark() == null ? other.getRefundRemark() == null : this.getRefundRemark().equals(other.getRefundRemark()))
&& (this.getRefundStatus() == null ? other.getRefundStatus() == null : this.getRefundStatus().equals(other.getRefundStatus()))
&& (this.getRefundFailReason() == null ? other.getRefundFailReason() == null : this.getRefundFailReason().equals(other.getRefundFailReason()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (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()))
&& (this.getExt4() == null ? other.getExt4() == null : this.getExt4().equals(other.getExt4()))
&& (this.getExt5() == null ? other.getExt5() == null : this.getExt5().equals(other.getExt5()))
&& (this.getExt6() == null ? other.getExt6() == null : this.getExt6().equals(other.getExt6()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
result = prime * result + ((getOrderChildId() == null) ? 0 : getOrderChildId().hashCode());
result = prime * result + ((getOrderChildNo() == null) ? 0 : getOrderChildNo().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 + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode());
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
result = prime * result + ((getGoodsDesc() == null) ? 0 : getGoodsDesc().hashCode());
result = prime * result + ((getGoodsImg() == null) ? 0 : getGoodsImg().hashCode());
result = prime * result + ((getGoodsSpecName() == null) ? 0 : getGoodsSpecName().hashCode());
result = prime * result + ((getGoodsCount() == null) ? 0 : getGoodsCount().hashCode());
result = prime * result + ((getRefundOrder() == null) ? 0 : getRefundOrder().hashCode());
result = prime * result + ((getReturnTotalPrice() == null) ? 0 : getReturnTotalPrice().hashCode());
result = prime * result + ((getRefundPrice() == null) ? 0 : getRefundPrice().hashCode());
result = prime * result + ((getRefundGold() == null) ? 0 : getRefundGold().hashCode());
result = prime * result + ((getRefundRemark() == null) ? 0 : getRefundRemark().hashCode());
result = prime * result + ((getRefundStatus() == null) ? 0 : getRefundStatus().hashCode());
result = prime * result + ((getRefundFailReason() == null) ? 0 : getRefundFailReason().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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());
result = prime * result + ((getExt4() == null) ? 0 : getExt4().hashCode());
result = prime * result + ((getExt5() == null) ? 0 : getExt5().hashCode());
result = prime * result + ((getExt6() == null) ? 0 : getExt6().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(", orderId=").append(orderId);
sb.append(", orderNo=").append(orderNo);
sb.append(", orderChildId=").append(orderChildId);
sb.append(", orderChildNo=").append(orderChildNo);
sb.append(", memId=").append(memId);
sb.append(", memName=").append(memName);
sb.append(", memPhone=").append(memPhone);
sb.append(", goodsType=").append(goodsType);
sb.append(", goodsId=").append(goodsId);
sb.append(", goodsName=").append(goodsName);
sb.append(", goodsDesc=").append(goodsDesc);
sb.append(", goodsImg=").append(goodsImg);
sb.append(", goodsSpecName=").append(goodsSpecName);
sb.append(", goodsCount=").append(goodsCount);
sb.append(", refundOrder=").append(refundOrder);
sb.append(", returnTotalPrice=").append(returnTotalPrice);
sb.append(", refundPrice=").append(refundPrice);
sb.append(", refundGold=").append(refundGold);
sb.append(", refundRemark=").append(refundRemark);
sb.append(", refundStatus=").append(refundStatus);
sb.append(", refundFailReason=").append(refundFailReason);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", ext4=").append(ext4);
sb.append(", ext5=").append(ext5);
sb.append(", ext6=").append(ext6);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -12,11 +12,26 @@ import java.math.BigDecimal;
@Data
public class CreateOrderChildModel {
/**
* 交易订单号
*/
private String orderNo;
/**
* 用户id
*/
private Long memId;
/**
* 用户名称
*/
private String memName;
/**
* 用户手机号
*/
private String memPhone;
/**
* 产品类型
*/

@ -13,6 +13,11 @@ import java.util.List;
@Data
public class CreateOrderModel {
/**
* 公司id
*/
private Long companyId;
/**
* 订单号
*/

@ -23,7 +23,7 @@ public interface OrderCreateHandleService {
* @param createOrderChild 子订单参数
* @return
*/
List<HighChildOrder> couponHandle(HighOrder order,HighDiscountUserRel discountUserRel, CreateOrderChildModel createOrderChild) throws Exception;
List<HighChildOrder> couponHandle(HighDiscountUserRel discountUserRel, CreateOrderChildModel createOrderChild) throws Exception;
/**
* 积分充值校验

@ -0,0 +1,29 @@
package com.hai.order.service;
import com.hai.entity.HighChildOrder;
import com.hai.entity.HighOrder;
/**
* 订单退款业务
* @className: OrderRefundService
* @author: HuRui
* @date: 2022/9/1
**/
public interface OrderRefundService {
/**
* 交易订单退款
* @param order 交易订单
* @param remarks 退款备注
*/
HighOrder createOrderRefund(HighOrder order, String remarks);
/**
* 子订单退款
* @param orderChild 子订单
* @param refundCount 退款数量
* @param remarks 退款备注
*/
HighChildOrder createOrderChildRefund(HighChildOrder orderChild,Integer refundCount, String remarks);
}

@ -1,5 +1,6 @@
package com.hai.order.service;
import com.hai.entity.HighChildOrder;
import com.hai.entity.HighOrder;
import com.hai.order.model.CreateOrderModel;
@ -35,13 +36,29 @@ public interface OrderService {
HighOrder createOrder(CreateOrderModel createOrderModel) throws Exception;
/**
* 取消订单
* 订单取消
* @param orderNo 订单号
* @param remarks 备注
* @return
*/
HighOrder cancelOrder(String orderNo,String remarks);
/**
* 订单退款
* @param orderNo
* @param remarks
* @return
*/
HighOrder refundOrder(String orderNo,String remarks);
/**
* 子订单退款
* @param childOrderNo
* @param remarks
* @return
*/
HighOrder refundChildOrder(String childOrderNo,String remarks);
/**
* 根据订单号查询交易订单号详情
* @param orderNo 订单号
@ -49,6 +66,13 @@ public interface OrderService {
*/
HighOrder getOrderDetailByNo(String orderNo);
/**
* 根据子订单号查询子订单信息
* @param childOrderNo
* @return
*/
HighChildOrder getChildOrderByNo(String childOrderNo);
/**
* 订单支付成功业务
* @param order

@ -66,7 +66,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
private HighCouponHandselService highCouponHandselService;
@Override
public List<HighChildOrder> couponHandle(HighOrder order,HighDiscountUserRel discountUserRel, CreateOrderChildModel createOrderChild) throws Exception {
public List<HighChildOrder> couponHandle(HighDiscountUserRel discountUserRel, CreateOrderChildModel createOrderChild) throws Exception {
if (createOrderChild.getSaleCount() != 1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "卡卷只能购买一张");
}
@ -108,25 +108,9 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
List<HighChildOrder> childOrderList = new ArrayList<>();
HighChildOrder childOrder;
childOrder = new HighChildOrder();
if (coupon.getCouponSource().equals(4)) {
String code = String.valueOf(new Random().nextInt(899999) + 100000);
// 下单请求
JSONObject jsonObject = HuiLianTongConfig.recharge(order.getOrderNo(),
childOrder.getSaleCount(),
coupon.getCouponKey(),
order.getMemPhone());
if (!jsonObject.getString("respCode").equals("0000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "下单失败");
}
JSONObject response = HuiLianTongUnionCardConfig.resolveResponse(jsonObject.getString("data"));
if (!response.getString("respCode").equals("0000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getString("msg"));
}
childOrder.setChannelOrderNo(response.getJSONObject("data").getString("rechargeOrderId"));
}
childOrder.setMemId(createOrderChild.getMemId());
childOrder.setMemName(createOrderChild.getMemName());
childOrder.setMemPhone(createOrderChild.getMemPhone());
childOrder.setChildOrderNo(childOrderNo);
childOrder.setGoodsType(OrderChildGoodsType.TYPE1.getNumber());
childOrder.setGoodsId(coupon.getId());
@ -139,6 +123,24 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
childOrder.setGiveawayType(false);
childOrder.setChildOrderStatus(OrderChildStatus.STATUS1.getNumber());
childOrder.setPraiseStatus(0);
childOrder.setCreateTime(new Date());
// 贵州中石化
if (coupon.getCouponSource().equals(4)) {
// 下单请求
JSONObject jsonObject = HuiLianTongConfig.recharge(createOrderChild.getOrderNo(),
childOrder.getSaleCount(),
coupon.getCouponKey(),
createOrderChild.getMemPhone());
if (!jsonObject.getString("respCode").equals("0000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "下单失败");
}
JSONObject response = HuiLianTongUnionCardConfig.resolveResponse(jsonObject.getString("data"));
if (!response.getString("respCode").equals("0000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getString("msg"));
}
childOrder.setChannelOrderNo(response.getJSONObject("data").getString("rechargeOrderId"));
}
// 校验优惠券是否可用 如果使用优惠券就只能使用卡券的原价
if (discountUserRel != null) {

@ -0,0 +1,125 @@
package com.hai.order.service.impl;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.dao.HighOrderRefundMapper;
import com.hai.entity.HighChildOrder;
import com.hai.entity.HighOrder;
import com.hai.entity.HighOrderRefund;
import com.hai.order.service.OrderRefundService;
import com.hai.order.service.OrderService;
import com.hai.order.type.OrderChildStatus;
import com.hai.order.type.OrderPayType;
import com.hai.order.type.OrderRefundStatus;
import com.hai.order.type.OrderStatus;
import com.hai.service.HighUserService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
/**
* @className: OrderRefundServiceImpl
* @author: HuRui
* @date: 2022/9/1
**/
@Service("orderRefundService")
public class OrderRefundServiceImpl implements OrderRefundService {
@Resource
private HighOrderRefundMapper orderRefundMapper;
@Resource
private HighUserService userService;
@Resource
private OrderService orderService;
@Override
public HighOrder createOrderRefund(HighOrder order, String remarks) {
// 使用了积分抵扣
if (order.getPayGold() != null && order.getPayGold().intValue() > 0) {
// 积分返回
String remark = "订单" + order.getOrderNo() + "退款,退还积分:" + order.getPayGold();
userService.goldHandle(order.getMemId(), order.getPayGold(), 1, 3, order.getId() , remark);
}
order.setOrderStatus(OrderStatus.STATUS4.getNumber());
order.setRefundTime(new Date());
for (HighChildOrder childOrder : order.getHighChildOrderList()) {
childOrder.setRefundTime(new Date());
}
if (order.getPayType() != null) {
// 原路退款
if (order.getPayType().equals(OrderPayType.PAY_TYPE1.getNumber())) {
} else if (order.getPayType().equals(OrderPayType.PAY_TYPE2.getNumber())) {
} else if (order.getPayType().equals(OrderPayType.PAY_TYPE4.getNumber())) {
} else if (order.getPayType().equals(OrderPayType.PAY_TYPE5.getNumber())) {
} else if (order.getPayType().equals(OrderPayType.PAY_TYPE6.getNumber())) {
} else if (order.getPayType().equals(OrderPayType.PAY_TYPE7.getNumber())) {
}
}
return orderService.updateOrderData(order);
}
@Override
public HighChildOrder createOrderChildRefund(HighChildOrder orderChild,Integer refundCount, String remarks) {
if (orderChild.getChildOrderStatus().equals(OrderChildStatus.STATUS2.getNumber())
|| orderChild.getChildOrderStatus().equals(OrderChildStatus.STATUS3.getNumber())){
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "子订单状态错误");
}
if (orderChild.getSurplusRefundIntegral() <= 0
&& orderChild.getSurplusRefundPrice().compareTo(new BigDecimal("0")) <= 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "子订单余额不足");
}
// 判断剩余可退商品数量
if (orderChild.getSurplusRefundNum() < refundCount) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款商品数量过多");
}
HighOrderRefund orderRefund = new HighOrderRefund();
orderRefund.setOrderId(orderChild.getOrderId());
orderRefund.setOrderNo(orderChild.getOrderNo());
orderRefund.setOrderChildId(orderChild.getId());
orderRefund.setOrderChildNo(orderChild.getChildOrderNo());
orderRefund.setMemId(orderChild.getMemId());
orderRefund.setMemName(orderChild.getMemPhone());
orderRefund.setMemPhone(orderChild.getMemPhone());
orderRefund.setGoodsType(orderChild.getGoodsType());
orderRefund.setGoodsId(orderChild.getGoodsId());
orderRefund.setGoodsName(orderChild.getGoodsName());
orderRefund.setGoodsDesc(orderChild.getGoodsDesc());
orderRefund.setGoodsImg(orderChild.getGoodsImg());
orderRefund.setGoodsSpecName(orderChild.getGoodsSpecName());
orderRefund.setGoodsCount(orderChild.getSaleCount());
orderRefund.setRefundOrder(orderChild.getOrderNo());
orderRefund.setReturnTotalPrice(orderChild.getTotalActualPrice());
orderRefund.setRefundPrice(orderChild.getSurplusRefundPrice());
orderRefund.setRefundGold(orderChild.getSurplusRefundIntegral());
orderRefund.setRefundRemark(remarks);
orderRefund.setRefundStatus(OrderRefundStatus.STATUS1.getNumber());
orderRefund.setCreateTime(new Date());
orderRefund.setUpdateTime(new Date());
orderRefundMapper.insert(orderRefund);
return orderChild;
}
}

@ -10,17 +10,12 @@ import com.hai.common.security.AESEncodeUtil;
import com.hai.dao.HighChildOrderMapper;
import com.hai.dao.HighOrderMapper;
import com.hai.entity.*;
import com.hai.enum_type.DiscountUseScope;
import com.hai.enum_type.OrderStatusEnum;
import com.hai.order.model.CreateOrderChildModel;
import com.hai.order.model.CreateOrderModel;
import com.hai.order.service.OrderCancelHandleService;
import com.hai.order.service.OrderCreateHandleService;
import com.hai.order.service.OrderPaySuccessService;
import com.hai.order.service.OrderService;
import com.hai.order.type.OrderChildGoodsType;
import com.hai.order.type.OrderChildStatus;
import com.hai.order.type.OrderProductType;
import com.hai.order.type.OrderStatus;
import com.hai.order.service.*;
import com.hai.order.type.*;
import com.hai.order.utils.OrderUtil;
import com.hai.service.HighDiscountAgentCodeService;
import com.hai.service.HighDiscountUserRelService;
@ -53,6 +48,9 @@ public class OrderServiceImpl implements OrderService {
@Resource
private HighChildOrderMapper childOrderMapper;
@Resource
private OrderRefundService orderRefundService;
@Resource
private RocketMQTemplate rocketMQTemplate;
@ -135,13 +133,20 @@ public class OrderServiceImpl implements OrderService {
order.setWhetherRebate(false);
order.setExceptionStatus(false);
order.setCreateTime(new Date());
order.setPayGold(0);
/*********** 组装处理子订单 商品业务************/
List<HighChildOrder> childOrderList = new ArrayList<>();
for (CreateOrderChildModel child : createOrderModel.getChildOrderList()) {
child.setMemId(order.getMemId());
child.setMemName(order.getMemName());
child.setMemPhone(order.getMemPhone());
// 购买卡券
if (child.getGoodsType().equals(OrderChildGoodsType.TYPE1.getNumber())) {
order.setProductType(OrderProductType.PRODUCT_TYPE5.getNumber());
childOrderList = orderCreateHandleService.couponHandle(order,discountUserRel, child);
childOrderList = orderCreateHandleService.couponHandle(discountUserRel, child);
// 积分充值
} else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE2.getNumber())) {
@ -187,88 +192,78 @@ public class OrderServiceImpl implements OrderService {
}
}
order.setHighChildOrderList(childOrderList);
/*********** 组装处理子订单 商品业务************/
// 计算订单金额
Map<String, Object> calculateOrderPrice = OrderUtil.calculateOrderPrice(order.getHighChildOrderList());
order.setTotalPrice(new BigDecimal(calculateOrderPrice.get("totalPrice").toString()));
order.setPayablePrice(new BigDecimal(calculateOrderPrice.get("payablePrice").toString()));
order.setDeductionPrice(order.getTotalPrice().subtract(order.getPayablePrice()));
order.setPayPrice(order.getPayablePrice());
// 是否使用了优惠券
/* if (discountUserRel != null) {
if (discountUserRel != null) {
order.setMemDiscountName(discountUserRel.getHighDiscount().getDiscountName());
// 优惠券使用范围
if (highDiscountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type1.getType())) {
if (discountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type1.getType())) {
// 暂无限制
} else if (highDiscountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type2.getType())) {
// 1:卡卷 2:金币充值 3:团油【加油站】 4: KFC 5:电影票 6:话费充值
if (!highOrder.getHighChildOrderList().get(0).getGoodsType().equals(1)) {
log.error("HighOrderController --> addOrder() error!", "此优惠券只能购买卡券商品使用");
} else if (discountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type2.getType())) {
if (!order.getProductType().equals(OrderProductType.PRODUCT_TYPE5.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "此优惠券只能购买卡券商品使用");
}
} else if (highDiscountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type3.getType())) {
if (!highOrder.getHighChildOrderList().get(0).getGoodsType().equals(6)) {
log.error("HighOrderController --> addOrder() error!", "此优惠券只能充值话费中使用");
} else if (discountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type3.getType())) {
if (!order.getProductType().equals(OrderProductType.PRODUCT_TYPE9.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "此优惠券只能充值话费中使用");
}
} else if (highDiscountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type7.getType())) {
if (!highOrder.getHighChildOrderList().get(0).getGoodsType().equals(3)) {
log.error("HighOrderController --> addOrder() error!", "此优惠券只能充值话费中使用");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "此优惠券只能充值话费中使用");
} else if (discountUserRel.getHighDiscount().getUseScope().equals(DiscountUseScope.type7.getType())) {
if (!order.getProductType().equals(OrderProductType.PRODUCT_TYPE6.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "此优惠券只能加油订单中使用");
}
} else {
log.error("HighOrderController --> addOrder() error!", "暂时无法使用此优惠券");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法使用此优惠券");
}
// 卡卷类型 1:满减 2:抵扣 3:折扣
if (highDiscountUserRel.getHighDiscount().getDiscountType() == 1) {
if (discountUserRel.getHighDiscount().getDiscountType() == 1) {
// 如果订单总额 小于 满减价格
if (highOrder.getTotalPrice().compareTo(highDiscountUserRel.getHighDiscount().getDiscountCondition()) > 1) {
log.error("HighOrderController --> addOrder() error!", "订单未达到满减额度");
throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, "订单未达到"+highDiscountUserRel.getHighDiscount().getDiscountCondition()+"元,无法使用此优惠券");
if (order.getTotalPrice().compareTo(discountUserRel.getHighDiscount().getDiscountCondition()) > 1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, "订单未达到"+discountUserRel.getHighDiscount().getDiscountCondition()+"元,无法使用此优惠券");
}
// 订单总额 - 满减额度
BigDecimal payablePrice = highOrder.getTotalPrice().subtract(highDiscountUserRel.getHighDiscount().getDiscountPrice());
BigDecimal payablePrice = order.getTotalPrice().subtract(discountUserRel.getHighDiscount().getDiscountPrice());
highOrder.setDeductionPrice(highDiscountUserRel.getHighDiscount().getDiscountPrice());
order.setDeductionPrice(discountUserRel.getHighDiscount().getDiscountPrice());
// 如果总额小于0
if (payablePrice.compareTo(new BigDecimal("0")) < 0) {
highOrder.setPayablePrice(new BigDecimal("0"));
order.setPayablePrice(new BigDecimal("0"));
} else {
highOrder.setPayablePrice(payablePrice);
order.setPayablePrice(payablePrice);
}
}
// 卡卷类型 1:满减 2:抵扣 3:折扣
if (highDiscountUserRel.getHighDiscount().getDiscountType() == 2) {
else if (discountUserRel.getHighDiscount().getDiscountType() == 2) {
// 订单总额 - 满减额度
BigDecimal payablePrice = highOrder.getTotalPrice().subtract(highDiscountUserRel.getHighDiscount().getDiscountPrice());
highOrder.setDeductionPrice(highDiscountUserRel.getHighDiscount().getDiscountPrice());
BigDecimal payablePrice = order.getTotalPrice().subtract(discountUserRel.getHighDiscount().getDiscountPrice());
order.setDeductionPrice(discountUserRel.getHighDiscount().getDiscountPrice());
// 如果总额小于0
if (payablePrice.compareTo(new BigDecimal("0")) == -1) {
highOrder.setPayablePrice(new BigDecimal("0"));
order.setPayablePrice(new BigDecimal("0"));
} else {
highOrder.setPayablePrice(payablePrice);
order.setPayablePrice(payablePrice);
}
}
// 卡卷类型 1:满减 2:抵扣 3:折扣
if (highDiscountUserRel.getHighDiscount().getDiscountType() == 3) {
else if (discountUserRel.getHighDiscount().getDiscountType() == 3) {
// 折扣除100
BigDecimal discountPrice = highDiscountUserRel.getHighDiscount().getDiscountPrice();
BigDecimal discountPrice = discountUserRel.getHighDiscount().getDiscountPrice();
// 订单总额 * 折扣
BigDecimal payablePrice = highOrder.getTotalPrice().multiply(discountPrice).setScale(2, BigDecimal.ROUND_HALF_DOWN);
highOrder.setDeductionPrice(highOrder.getTotalPrice().subtract(payablePrice));
highOrder.setPayablePrice(payablePrice);
BigDecimal payablePrice = order.getTotalPrice().multiply(discountPrice).setScale(2, BigDecimal.ROUND_HALF_DOWN);
order.setDeductionPrice(order.getTotalPrice().subtract(payablePrice));
order.setPayablePrice(payablePrice);
}
}*/
// 计算订单金额
Map<String, Object> calculateOrderPrice = OrderUtil.calculateOrderPrice(order.getHighChildOrderList());
order.setTotalPrice(new BigDecimal(calculateOrderPrice.get("totalPrice").toString()));
order.setPayablePrice(new BigDecimal(calculateOrderPrice.get("payablePrice").toString()));
order.setDeductionPrice(order.getTotalPrice().subtract(order.getPayablePrice()));
order.setPayPrice(order.getPayablePrice());
}
// 积分抵扣
if (createOrderModel.getPayGold() != null) {
if (createOrderModel.getPayGold() != null && createOrderModel.getPayGold().compareTo(0) == 1) {
// 查询用户
HighUser user = userService.findByUserId(order.getMemId());
if (user == null) {
@ -319,6 +314,29 @@ public class OrderServiceImpl implements OrderService {
}
}
// 订单入库前处理
for (HighChildOrder childOrder : order.getHighChildOrderList()) {
childOrder.setOrderNo(order.getOrderNo());
// 计算子订单退款金额。
if (order.getPayPrice().compareTo(new BigDecimal("0")) == 1) {
childOrder.setSurplusRefundPrice(childOrder.getTotalActualPrice()
.divide(order.getPayPrice(), 4, BigDecimal.ROUND_DOWN)
.multiply(new BigDecimal("100")).setScale(2));
} else {
childOrder.setSurplusRefundPrice(new BigDecimal("0"));
}
// 计算子订单退款积分
if (order.getPayGold() > 0) {
childOrder.setSurplusRefundIntegral(childOrder.getTotalActualPrice()
.divide(new BigDecimal(order.getPayGold().toString()), 4, BigDecimal.ROUND_DOWN)
.multiply(new BigDecimal("100")).setScale(2).multiply(new BigDecimal("10000")).intValue());
} else {
childOrder.setSurplusRefundIntegral(0);
}
}
// 订单入库
HighOrder orderData = insertOrderData(order);
if (orderData.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) {
@ -371,6 +389,7 @@ public class OrderServiceImpl implements OrderService {
for (HighChildOrder childOrder : order.getHighChildOrderList()) {
childOrder.setChildOrderStatus(OrderChildStatus.STATUS5.getNumber());
childOrder.setCancelTime(new Date());
// 购买卡券
if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE1.getNumber())) {
@ -385,6 +404,31 @@ public class OrderServiceImpl implements OrderService {
return updateOrderData(order);
}
@Override
public HighOrder refundOrder(String orderNo, String remarks) {
HighOrder order = getOrderDetailByNo(orderNo);
if (!order.getOrderStatus().equals(OrderStatus.STATUS2.getNumber())
|| !order.getOrderStatus().equals(OrderStatus.STATUS3.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单状态错误");
}
// 订单是否异常,订单没异常则需要校验产品业务是否支持退款
if (order.getExceptionStatus().equals(false)
// 产品业务是否支付退款
&& (order.getProductType().equals(OrderProductType.PRODUCT_TYPE3.getNumber())
|| order.getProductType().equals(OrderProductType.PRODUCT_TYPE4.getNumber())
|| order.getProductType().equals(OrderProductType.PRODUCT_TYPE5.getNumber()))
) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单无法退款!");
}
return orderRefundService.createOrderRefund(order, remarks);
}
@Override
public HighOrder refundChildOrder(String childOrderNo, String remarks) {
return null;
}
@Override
@Cached(cacheType = CacheType.BOTH,name="order:", key = "#orderNo",expire = 3600*24*30)
public HighOrder getOrderDetailByNo(String orderNo) {
@ -403,6 +447,17 @@ public class OrderServiceImpl implements OrderService {
return order;
}
@Override
public HighChildOrder getChildOrderByNo(String childOrderNo) {
HighChildOrderExample childOrderExample = new HighChildOrderExample();
childOrderExample.createCriteria().andChildOrderNoEqualTo(childOrderNo);
List<HighChildOrder> list = childOrderMapper.selectByExample(childOrderExample);
if (list.size() == 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的子订单号");
}
return list.get(0);
}
@Override
public HighOrder orderPaySuccessBus(HighOrder order) {
try {

@ -0,0 +1,53 @@
package com.hai.order.type;
import java.util.Objects;
/**
* 订单退款状态
* @className: OrderRefundStatus
* @author: HuRui
* @date: 2022/9/1
**/
public enum OrderRefundStatus {
STATUS1(1, "退款中"),
STATUS2(2, "退款成功"),
STATUS3(3, "退款失败"),
;
private Integer number;
private String name;
OrderRefundStatus(int number, String name) {
this.number = number;
this.name = name;
}
/**
* 根据类型查询数据
* @param type
* @return
*/
public static OrderRefundStatus getDataByType(Integer type) {
for (OrderRefundStatus ele : values()) {
if(Objects.equals(type,ele.getNumber())) return ele;
}
return null;
}
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
Loading…
Cancel
Save