调整内容
parent
17ee7dd08b
commit
a92545f0d1
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue