Update Order.php

This commit is contained in:
邹景立 2021-02-24 15:56:26 +08:00
parent e6c9ae591a
commit 4ff964c11e

View File

@ -75,8 +75,8 @@ class Order extends Auth
if (empty($goodsInfo)) $this->error('商品数据查询异常');
if (empty($goodsItem)) $this->error('商品规格查询异常');
// 商品类型检查
if ($goodsItem['truck_type'] < 0) $truckType = $goodsItem['truck_type'];
if ($truckType !== $goodsItem['truck_type']) $this->error('实物与虚拟不能混下单!');
if ($goodsInfo['truck_type'] < 0) $truckType = $goodsInfo['truck_type'];
if ($truckType !== $goodsInfo['truck_type']) $this->error('实物与虚拟不能混下单!');
// 限制购买数量
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]];