feat: 优化 MerchantLogic.php 中 goods_id 对应的 nums 数据赋值逻辑,增加可空默认值
This commit is contained in:
parent
a96f6c8d41
commit
a3531fd253
@ -268,7 +268,7 @@ class MerchantLogic extends BaseLogic
|
||||
$data = [
|
||||
'mer_id' => $params['mer_id'],
|
||||
'goods_id' => $v['goods_id'],
|
||||
'nums' => $v['nums']
|
||||
'nums' => $v['nums']??0
|
||||
];
|
||||
$has = Db::name('merchant_bind_goods')->where('mer_id', $params['mer_id'])->where('goods_id', $v['goods_id'])->findOrEmpty();
|
||||
if (!empty($has)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user