Commit b1c74081 authored by liuyuzhen's avatar liuyuzhen

组合销售缓存设置

parent 73152f43
......@@ -141,7 +141,7 @@ class GoodsModel extends \DAO\AbstractModel {
/**
* 更新商品缓存
* @param $goodsList 商品列表
* @param int $op 删减标识符(1:增加,0:减少)
* @param int $op 删减标识符(1:增加,0:减少,2:直接设置)
* @return bool
*/
public function opOnlineStorageGoodsByGoodsCommonIds($goodsList,$op = \Our\ApiConst::minus){
......@@ -155,6 +155,8 @@ class GoodsModel extends \DAO\AbstractModel {
$temp['goodsStorage'] -= $goodsList[$goodsCommonId][$goodsId]['goodsNum'];
}else if($op == \Our\ApiConst::plus){
$temp['goodsStorage'] += $goodsList[$goodsCommonId][$goodsId]['goodsNum'];
}else if($op == \Our\ApiConst::set){
$temp['goodsStorage'] = $goodsList[$goodsCommonId][$goodsId]['goodsNum'];
}else{
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment