|
|
@@ -1529,6 +1529,11 @@ class ProductClass extends BaseClass
|
|
|
if (isset($data["classId"])) {
|
|
|
$classId = $data['classId'];
|
|
|
$upData['classId'] = $classId;
|
|
|
+ if (isset($product->classId) && $product->classId == $classId) {
|
|
|
+ //如果有修改分类,则在多个订单表中同步修改,如需修改,多个地方要同步修改,请搜索关键词item_class_modify_sync
|
|
|
+ $itemClassKey = 'item_class_modify_sync';
|
|
|
+ Yii::$app->redis->executeCommand('LPUSH', [$itemClassKey, $id]);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (isset($data["scanNum"]) && is_numeric($data["scanNum"])) {
|
|
|
@@ -1693,6 +1698,11 @@ class ProductClass extends BaseClass
|
|
|
$staffName = $staff->name ?? '';
|
|
|
$changeParams2 = ['staffId' => $staffId, 'staffName' => $staffName];
|
|
|
|
|
|
+ $chainProduct = ProductClass::getByCondition(['mainId' => $chainMainId, 'itemId' => $ptItemId], true);
|
|
|
+ if (empty($chainProduct)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
//如果有同步分类则移动,没有则不移动
|
|
|
if (isset($params['classId'])) {
|
|
|
$masterClassId = $params['classId'];
|
|
|
@@ -1704,16 +1714,16 @@ class ProductClass extends BaseClass
|
|
|
foreach ($classList as $currentClass) {
|
|
|
if ($currentClass->name == $masterClassName) {
|
|
|
$params['classId'] = $currentClass->id ?? 0;
|
|
|
+ if (isset($chainProduct->classId) && $chainProduct->classId != $params['classId']) {
|
|
|
+ //如果有修改分类,则在多个订单表中同步修改,如需修改,多个地方要同步修改,请搜索关键词item_class_modify_sync
|
|
|
+ $itemClassKey = 'item_class_modify_sync';
|
|
|
+ Yii::$app->redis->executeCommand('LPUSH', [$itemClassKey, $chainProduct->id]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $chainProduct = ProductClass::getByCondition(['mainId' => $chainMainId, 'itemId' => $ptItemId], true);
|
|
|
- if (empty($chainProduct)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
/***************产品模块*****************/
|
|
|
if (!empty($ptCpIds)) {
|
|
|
$chainProductId = $chainProduct->id ?? 0;
|