|
@@ -305,11 +305,13 @@ class WholeController extends Curd
|
|
|
Db::beginTransaction();
|
|
|
|
|
|
$order = Order::where('order_id', $params['order_id'])
|
|
|
- ->where('order_category', 'SYSTEM')
|
|
|
- ->whereIn('order_status_system', ['WAITING', 'SENDING'])
|
|
|
+ ->where('order_status_system','CANCEL')
|
|
|
+ ->orWhere(function($query){
|
|
|
+ $query->whereIn('order_status_system', ['WAITING', 'SENDING'])->where('order_category', 'SYSTEM');
|
|
|
+ })
|
|
|
->first();
|
|
|
if (!$order) {
|
|
|
- return json_fail('订单异常');
|
|
|
+ return json_fail('此订单不允许删除');
|
|
|
}
|
|
|
|
|
|
$payDetail = PayDetail::where('join_pay_order_id', $order->order_groupby)->first();
|