mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update Order.php
This commit is contained in:
parent
47f167dc23
commit
95751ca512
@ -80,9 +80,7 @@ class Order extends Auth
|
||||
if (isset($goods['limit_max_num']) && $goods['limit_max_num'] > 0) {
|
||||
$map = [['a.status', 'in', [2, 3, 4, 5]], ['b.goods_code', '=', $goods['code']], ['a.uid', '=', $this->uuid]];
|
||||
$buys = $this->app->db->name('StoreOrder')->alias('a')->join('store_order_item b', 'a.order_no=b.order_no')->where($map)->sum('b.stock_sales');
|
||||
if ($this->member['vip_entry'] && $goods['vip_entry'] || $buys + $count > $goods['limit_max_num']) {
|
||||
$this->error('超过限购数量');
|
||||
}
|
||||
if ($buys + $count > $goods['limit_max_num']) $this->error('超过限购数量');
|
||||
}
|
||||
// 限制最购买
|
||||
if ($goodsInfo['limit_low_vip'] > $this->user['vip_number']) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user