|
@@ -43,7 +43,6 @@ class CpClass extends BaseClass
|
|
|
if (!empty($oldCpItemList)) {
|
|
if (!empty($oldCpItemList)) {
|
|
|
$ptItemIds = array_keys($oldCpItemList);
|
|
$ptItemIds = array_keys($oldCpItemList);
|
|
|
$newProductList = ProductClass::getAllByCondition(['mainId' => $newMainId, 'itemId' => ['in', $ptItemIds]], null, '*', 'itemId');
|
|
$newProductList = ProductClass::getAllByCondition(['mainId' => $newMainId, 'itemId' => ['in', $ptItemIds]], null, '*', 'itemId');
|
|
|
- print_r($newProductList);die;
|
|
|
|
|
foreach ($oldCpItemList as $ptItemId => $oldCpItem) {
|
|
foreach ($oldCpItemList as $ptItemId => $oldCpItem) {
|
|
|
if (isset($newProductList[$ptItemId])) {
|
|
if (isset($newProductList[$ptItemId])) {
|
|
|
$currentProduct = $newProductList[$ptItemId];
|
|
$currentProduct = $newProductList[$ptItemId];
|
|
@@ -53,6 +52,7 @@ class CpClass extends BaseClass
|
|
|
unset($oldCpItem['updateTime']);
|
|
unset($oldCpItem['updateTime']);
|
|
|
$oldCpItem['productId'] = $currentProductId;
|
|
$oldCpItem['productId'] = $currentProductId;
|
|
|
$oldCpItem['cpId'] = $newCpId;
|
|
$oldCpItem['cpId'] = $newCpId;
|
|
|
|
|
+ print_r($oldCpItem);die;
|
|
|
CpItemClass::add($oldCpItem, true);
|
|
CpItemClass::add($oldCpItem, true);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|