修复BUG

This commit is contained in:
liu
2026-08-27 14:20:09 +08:00
parent 513cc568a9
commit 52dc6efadf
203 changed files with 576 additions and 1130 deletions
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Mini;
use App\Exceptions\RepositoryException;
use App\Http\Requests\Mini\MiniOrderRequest;
use App\Models\CartModel;
use App\Models\CustomerLevelModel;
use App\Models\ProductModel;
use App\Models\StoreOrderItemModel;
@@ -104,6 +105,12 @@ class OrderController extends BaseMiniController
}
StoreOrderItemModel::insert($rows);
// 下单成功后自动清空购物车中已下单的商品
CartModel::query()
->where('store_id', $store->id)
->whereIn('product_id', $productIds)
->delete();
return $order;
});