|
|
@@ -20,10 +20,11 @@ class MarketLogic
|
|
|
{
|
|
|
//获取市场价
|
|
|
$minPrice = ProductTransfer::getTransferMinPrice($productId);
|
|
|
+ if($price < $minPrice || empty($minPrice)) $minPrice = $price;
|
|
|
//添加市场
|
|
|
$rows = ProductMarket::where('product_id', $productId)->find();
|
|
|
if(empty($rows)){
|
|
|
- if($price < $minPrice || empty($minPrice)) $minPrice = $price;
|
|
|
+
|
|
|
ProductMarket::create([
|
|
|
'product_id' => $productId,
|
|
|
'type_id' => ProductLists::getProductTypeById($productId),
|