6
0
Fork 0

调整内容

release
vine_liutk 2022-01-19 16:06:53 +08:00 committed by 李静
parent 17ee7dd08b
commit a92545f0d1
1 changed files with 8 additions and 0 deletions

View File

@ -10,6 +10,7 @@ use App\Helpers\Paginator as PaginatorHelper;
use App\Models\DealerOrder;
use App\Models\DealerProduct;
use App\Services\Dealer\OrderService;
use Illuminate\Database\QueryException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Throwable;
@ -160,6 +161,13 @@ class OrderController extends Controller
$orderService->paidOrder($order);//确认收款
$orderService->shippingOrder($order);//确认发货
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) {
DB::rollBack();
report($th);