|
|
|
|
@ -80,8 +80,10 @@ class OrdersController extends CommonController
|
|
|
|
|
$item = OrderItems::with(["order", "siblings"])->find($request->item_id);
|
|
|
|
|
if (request()->is_batch) {
|
|
|
|
|
$order_items = $item->siblings;
|
|
|
|
|
$total = $item->siblings->count();
|
|
|
|
|
} else {
|
|
|
|
|
$order_items = [$item];
|
|
|
|
|
$total = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DB::beginTransaction();
|
|
|
|
|
@ -112,7 +114,7 @@ class OrdersController extends CommonController
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
DB::commit();
|
|
|
|
|
return $this->success("处理成功!");
|
|
|
|
|
return $this->success("处理成功".$total."条数据!");
|
|
|
|
|
} catch (\Exception $exception) {
|
|
|
|
|
DB::rollBack();
|
|
|
|
|
return $this->error($exception->getMessage().$exception->getLine());
|
|
|
|
|
|