|
|
@@ -58,12 +58,14 @@ class ProductController extends Controller
|
|
|
$ptItemId = $product->itemId ?? 0;
|
|
|
$weight = $product->weight ?? 0;
|
|
|
$addPrice = $product->addPrice ?? 0;
|
|
|
+ $ratio = $product->ratio ?? 20;
|
|
|
$p = ProductClass::getByCondition(['shopId' => 214, 'itemId' => $ptItemId], true);
|
|
|
if (!empty($p)) {
|
|
|
- $p->addPrice = $addPrice;
|
|
|
- $p->weight = $weight;
|
|
|
+ //$p->addPrice = $addPrice;
|
|
|
+ //$p->weight = $weight;
|
|
|
+ $p->ratio = $ratio;
|
|
|
$p->save();
|
|
|
- echo "productId {$p->id} 加价改成了:{$addPrice} 重量改成了:{$weight} \n";
|
|
|
+ echo "productId {$p->id} 加价改成了:{$addPrice} 重量改成了:{$weight} 比例修改为 {$ratio} \n";
|
|
|
}
|
|
|
}
|
|
|
}
|