feat: 增加'swap'参数到商品存储逻辑

This commit is contained in:
mkm 2024-06-14 13:56:09 +08:00
parent 88e6f861ab
commit 180ac14af8

View File

@ -48,6 +48,7 @@ class StoreProductLogic extends BaseLogic
'purchase' => $params['purchase'],
'rose' => $params['rose'],
'is_return' => $params['is_return'],
'swap' => $params['swap']??0,
];
// if ($params['rose'] > 0) {
// $rose_price = bcmul($params['cost'], $params['rose'], 2);
@ -119,6 +120,7 @@ class StoreProductLogic extends BaseLogic
'price' => $params['price'],
'vip_price' => $params['vip_price'],
'cost' => $params['cost'],
'swap' => $params['swap']??0,
];
StoreProduct::where('id', $params['id'])->update($data);