调整内容
parent
17ee7dd08b
commit
a92545f0d1
|
|
@ -10,6 +10,7 @@ use App\Helpers\Paginator as PaginatorHelper;
|
||||||
use App\Models\DealerOrder;
|
use App\Models\DealerOrder;
|
||||||
use App\Models\DealerProduct;
|
use App\Models\DealerProduct;
|
||||||
use App\Services\Dealer\OrderService;
|
use App\Services\Dealer\OrderService;
|
||||||
|
use Illuminate\Database\QueryException;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
@ -160,6 +161,13 @@ class OrderController extends Controller
|
||||||
$orderService->paidOrder($order);//确认收款
|
$orderService->paidOrder($order);//确认收款
|
||||||
$orderService->shippingOrder($order);//确认发货
|
$orderService->shippingOrder($order);//确认发货
|
||||||
DB::commit();
|
DB::commit();
|
||||||
|
} catch (QueryException $e) {
|
||||||
|
DB::rollBack();
|
||||||
|
if (strpos($e->getMessage(), 'Numeric value out of range') !== false) {
|
||||||
|
$e = new BizException('当前可发货库存不足');
|
||||||
|
}
|
||||||
|
|
||||||
|
throw $e;
|
||||||
} catch (Throwable $th) {
|
} catch (Throwable $th) {
|
||||||
DB::rollBack();
|
DB::rollBack();
|
||||||
report($th);
|
report($th);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue