fix[litemall-db, litemall-wx-api]: #271

This commit is contained in:
Junling Bu
2019-09-28 23:12:26 +08:00
parent b06349de9e
commit 7f11a6a13f
2 changed files with 7 additions and 1 deletions

View File

@@ -144,6 +144,12 @@ public class OrderUtil {
return OrderUtil.STATUS_CREATE == litemallOrder.getOrderStatus().shortValue();
}
public static boolean hasPayed(Order order) {
return OrderUtil.STATUS_CREATE != order.getOrderStatus()
&& OrderUtil.STATUS_CANCEL != order.getOrderStatus()
&& OrderUtil.STATUS_AUTO_CANCEL != order.getOrderStatus();
}
public static boolean isPayStatus(LitemallOrder litemallOrder) {
return OrderUtil.STATUS_PAY == litemallOrder.getOrderStatus().shortValue();
}

View File

@@ -613,7 +613,7 @@ public class WxOrderService {
}
// 检查这个订单是否已经处理过
if (OrderUtil.isPayStatus(order) && order.getPayId() != null) {
if (OrderUtil.hasPayed(order)) {
return WxPayNotifyResponse.success("订单已经处理成功!");
}