From 31d04d29324e38e2c7f6b8042b20d2c538bdd0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 7 Jul 2021 19:02:36 +0800 Subject: [PATCH] Update Order.php --- app/data/controller/api/auth/Order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/data/controller/api/auth/Order.php b/app/data/controller/api/auth/Order.php index c174fb444..e0db0e0bf 100644 --- a/app/data/controller/api/auth/Order.php +++ b/app/data/controller/api/auth/Order.php @@ -82,7 +82,7 @@ class Order extends Auth // 限制购买数量 if (isset($goods['limit_max_num']) && $goods['limit_max_num'] > 0) { $map = [['a.uuid', '=', $this->uuid], ['a.status', 'in', [2, 3, 4, 5]], ['b.goods_code', '=', $goods['code']]]; - $buys = $this->app->db->name('DataOrder')->alias('a')->join('store_order_item b', 'a.order_no=b.order_no')->where($map)->sum('b.stock_sales'); + $buys = $this->app->db->name('ShopOrderr')->alias('a')->join('store_order_item b', 'a.order_no=b.order_no')->where($map)->sum('b.stock_sales'); if ($buys + $count > $goods['limit_max_num']) $this->error('超过限购数量'); } // 限制购买身份