|
|
@@ -603,4 +603,14 @@ class ProductClass extends BaseClass
|
|
|
}
|
|
|
self::updateById($id, $upData);
|
|
|
}
|
|
|
+
|
|
|
+ //自动改价 2021.4.14
|
|
|
+ public static function autoPriceById($productId)
|
|
|
+ {
|
|
|
+ $product = self::getById($productId);
|
|
|
+ if($product && $product['priceLabel']==self::PRICE_LABEL_AUTO){
|
|
|
+ $price = bcadd($product['cost'],$product['addPrice'],2);
|
|
|
+ self::changePrice($productId,$product['shopId'],$price,self::PRICE_LABEL_AUTO);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|