更新默认值
This commit is contained in:
parent
6d7edcd628
commit
41b2df4a81
@ -2361,6 +2361,9 @@ class ProductRepository extends BaseRepository
|
|||||||
throw new ValidateException('订单商品不存在');
|
throw new ValidateException('订单商品不存在');
|
||||||
}
|
}
|
||||||
if( $orderProduct->is_imported == 1){
|
if( $orderProduct->is_imported == 1){
|
||||||
|
if($stockIn==0){
|
||||||
|
$stockIn=1;
|
||||||
|
}
|
||||||
ProductAttrValue::where('mer_id', $merId)
|
ProductAttrValue::where('mer_id', $merId)
|
||||||
->where('product_id', $params['product_id'])->where('unique', $params['unique'])
|
->where('product_id', $params['product_id'])->where('unique', $params['unique'])
|
||||||
->update(['stock'=>$attrValue->stock + $stockIn]);
|
->update(['stock'=>$attrValue->stock + $stockIn]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user