作者 耿培杰

修改订单付款接口

... ... @@ -1202,11 +1202,11 @@ class Order extends Api
if ($v['type'] == 2) {
//判断积分商品是否有库存
$is_stock = $this->integralGoodsModel->checkStockNum($v['goods_id'], $v['number']);
if (!$is_stock) $this->error($v['ch_goods_name'] . ' 库存不足');
if (!$is_stock) $this->error($v['ch_goods_name'] . ' 库存不足1');
} else {
//判断商品是否有库存
$is_stock = $this->goodsModel->checkStockNum($v['goods_id'], $v['number']);
if (!$is_stock) $this->error($v['ch_goods_name'] . ' 库存不足');
if (!$is_stock) $this->error($v['ch_goods_name'] . ' 库存不足2');
}
}
//判断团购是否满人
... ...
... ... @@ -76,7 +76,6 @@ class Order extends Model
if ($goods['type'] == 3) $goods['type'] = '1';
//根据仓库进行拆单
$data[] = $goodsModel->getDepot($goods['goods_id'], $areaId, $goods['number'], $goods['type']);
if (!$data[$key]) return ['code' => -1, 'msg' => $goods['ch_goods_name'] . ' 库存不足'];
}
//获取以仓库分好的商品
$goodsDepotList = setArr($data);
... ... @@ -234,7 +233,6 @@ class Order extends Model
if ($goods['type'] == 3) $goods['type'] = '1';
//根据仓库进行拆单
$data[] = $goodsModel->getDepot($goods['goods_id'], $areaId, $goods['number'], $goods['type']);
if (!$data[$key]) return ['code' => -1, 'msg' => $goods['ch_goods_name'] . ' 库存不足'];
}
//获取以仓库分好的商品
$goodsDepotList = setArr($data);
... ...