|
|
@@ -604,22 +604,19 @@ class ProductClass extends BaseClass
|
|
|
|
|
|
//会员价同步变化
|
|
|
$addPrice = $currentInfo->addPrice ?? 0;
|
|
|
+
|
|
|
$skAddPrice = $currentInfo->skAddPrice ?? 0;
|
|
|
- $sk = bcsub($skAddPrice, $addPrice, 2);
|
|
|
- if ($sk > 0) {
|
|
|
- //大众会员价比标准会员价高所以相加
|
|
|
- $currentInfo->skPrice = bcadd($price, $sk, 2);
|
|
|
- }
|
|
|
+ $sk = bcsub($addPrice,$skAddPrice, 2);
|
|
|
+ $currentInfo->skPrice = bcsub($price, $sk, 2);
|
|
|
+
|
|
|
$hjAddPrice = $currentInfo->hjAddPrice ?? 0;
|
|
|
$hj = bcsub($addPrice, $hjAddPrice, 2);
|
|
|
- if ($hj > 0) {
|
|
|
- $currentInfo->hjPrice = bcsub($price, $hj, 2);
|
|
|
- }
|
|
|
+ $currentInfo->hjPrice = bcsub($price, $hj, 2);
|
|
|
+
|
|
|
$zsAddPrice = $currentInfo->zsAddPrice ?? 0;
|
|
|
$zs = bcsub($addPrice, $zsAddPrice, 2);
|
|
|
- if ($zs > 0) {
|
|
|
- $currentInfo->zsPrice = bcsub($price, $zs, 2);
|
|
|
- }
|
|
|
+ $currentInfo->zsPrice = bcsub($price, $zs, 2);
|
|
|
+
|
|
|
$currentInfo->save();
|
|
|
|
|
|
}
|