|
|
@@ -969,6 +969,17 @@ class ProductClass extends BaseClass
|
|
|
if (empty($chainProduct)) {
|
|
|
continue;
|
|
|
}
|
|
|
+
|
|
|
+ //加盟店仅同步名称等非重要参数
|
|
|
+ if ($chainShop->join == 1) {
|
|
|
+ unset($params['skPrice']);
|
|
|
+ unset($params['skMore']);
|
|
|
+ unset($params['price']);
|
|
|
+ unset($params['addPrice']);
|
|
|
+ self::updateById($chainProduct->id, $params);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
if ($price != $chainProduct->price) {
|
|
|
//花店价有变化
|
|
|
self::changeSinglePrice($chainShop, $ptItemId, $price, $currentSkPrice, $changeParams2);
|
|
|
@@ -980,16 +991,10 @@ class ProductClass extends BaseClass
|
|
|
unset($params['price']);
|
|
|
}
|
|
|
}
|
|
|
- if (isset($chainShop->join) && $chainShop->join == 1) {
|
|
|
- //加盟店仅同步名称等非重要因素
|
|
|
- if (isset($params['name'])) {
|
|
|
- $jmParams = ['name' => $params['name']];
|
|
|
- self::updateById($chainProduct->id, $jmParams);
|
|
|
- }
|
|
|
- } else {
|
|
|
- //直营店同步价格等重要因素
|
|
|
- self::updateById($chainProduct->id, $params);
|
|
|
- }
|
|
|
+
|
|
|
+ //直营店同步价格等重要因素
|
|
|
+ self::updateById($chainProduct->id, $params);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|