fix[litemall-db, litemall-wx-api]: #271
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -613,7 +613,7 @@ public class WxOrderService {
|
||||
}
|
||||
|
||||
// 检查这个订单是否已经处理过
|
||||
if (OrderUtil.isPayStatus(order) && order.getPayId() != null) {
|
||||
if (OrderUtil.hasPayed(order)) {
|
||||
return WxPayNotifyResponse.success("订单已经处理成功!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user