Commit 87e5c3a7 authored by Junling Bu's avatar Junling Bu
Browse files

update[litemall-wx-api]: 小商城后台服务进一步区分用户取消订单和系统自动取消订单

1. 用户取消订单,状态码102
2. 系统自动取消订单,状态码103
parent 80e4cedc
......@@ -9,7 +9,7 @@ import java.util.List;
/*
* 订单流程:下单成功-》支付订单-》发货-》收货
* 订单状态:
* 101 订单生成,未支付;102,订单生产,但是未支付就取消
* 101 订单生成,未支付;102,下单未支付用户取消;103,下单未支付超期系统自动取消
* 201 支付完成,商家未发货;202,订单生产,已付款未发货,却取消
* 301 商家发货,用户未确认;
* 401 用户确认收货,订单结束; 402 用户没有确认收货,但是快递反馈已收获后,超过一定时间,系统自动确认收货,订单结束。
......@@ -26,11 +26,12 @@ public class OrderUtil {
public static final Short STATUS_CREATE = 101;
public static final Short STATUS_PAY = 201;
public static final Short STATUS_SHIP= 301;
public static final Short STATUS_SHIP = 301;
public static final Short STATUS_CONFIRM = 401;
public static final Short STATUS_CANCEL= 102;
public static final Short STATUS_CANCEL = 102;
public static final Short STATUS_AUTO_CANCEL = 103;
public static final Short STATUS_REFUND = 202;
public static final Short STATUS_AUTO_CONFIRM= 402;
public static final Short STATUS_AUTO_CONFIRM = 402;
public static String orderStatusText(LitemallOrder order) {
......@@ -40,7 +41,7 @@ public class OrderUtil {
return "未付款";
}
if (status == 102) {
if (status == 102 || status == 103) {
return "已取消";
}
......@@ -79,7 +80,7 @@ public class OrderUtil {
handleOption.setCancel(true);
handleOption.setPay(true);
}
else if (status == 102) {
else if (status == 102 || status == 103) {
// 如果订单已经取消或是已完成,则可删除
handleOption.setDelete(true);
handleOption.setRebuy(true);
......
......@@ -30,7 +30,7 @@ import java.util.Map;
* 订单设计
*
* 订单状态:
* 101 订单生成,未支付;102,订单生产,但是未支付就取消
* 101 订单生成,未支付;102,下单后未支付用户取消;103,下单后未支付超时系统自动取消
* 201 支付完成,商家未发货;202,订单生产,已付款未发货,但是退款取消;
* 301 商家发货,用户未确认;
* 401 用户确认收货,订单结束; 402 用户没有确认收货,但是快递反馈已收获后,超过一定时间,系统自动确认收货,订单结束。
......@@ -776,7 +776,7 @@ public class WxOrderController {
TransactionStatus status = txManager.getTransaction(def);
try {
// 设置订单已取消状态
order.setOrderStatus(OrderUtil.STATUS_CANCEL);
order.setOrderStatus(OrderUtil.STATUS_AUTO_CANCEL);
order.setEndTime(LocalDateTime.now());
orderService.updateById(order);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment