|
|
|
@ -207,7 +207,14 @@ class OrderOnlineService implements OrderOnlineServiceInterface |
|
|
|
$subAmount = 0; |
|
|
|
|
|
|
|
// 店铺分类
|
|
|
|
$storeType = Store::query()->where(['id' => $storeId])->value('category_id'); |
|
|
|
$store = Store::query()->where(['id' => $storeId])->first(); |
|
|
|
|
|
|
|
// 禁止店铺自己下自己的单
|
|
|
|
if (in_array($userId, [$store->user_id, $store->admin_id])) { |
|
|
|
throw new ErrorCodeException(ErrorCode::ORDER_ONLINE_FAIL, '无法购买自己店铺商品', ['store' => json_encode($store), 'user_id' => $userId, 'store_item' => $storeItem]); |
|
|
|
} |
|
|
|
|
|
|
|
$storeType = $store->category_id; |
|
|
|
$storeTypeIds[] = (string)$storeType; |
|
|
|
// 店铺今天的订单数
|
|
|
|
$count = Order::query() |
|
|
|
|