|
|
@@ -117,6 +117,7 @@ class ItemService extends BaseService
|
|
|
{
|
|
|
$shop = ShopClass::getById($shopId, true);
|
|
|
$ptStyle = $shop->ptStyle ?? dict::getDict('ptStyle', 'hd');
|
|
|
+ $mainId = $shop->mainId ?? 0;
|
|
|
if ($ptStyle == dict::getDict('ptStyle', 'hd')) {
|
|
|
$ptClass = PtItemCatClass::getAllList("*", ['type' => 1], 'inTurn desc');
|
|
|
} elseif ($ptStyle == dict::getDict('ptStyle', 'ghs')) {
|
|
|
@@ -181,6 +182,7 @@ class ItemService extends BaseService
|
|
|
|
|
|
$productData = $currentItem;
|
|
|
$productData['sjId'] = $sjId;
|
|
|
+ $productData['mainId'] = $mainId;
|
|
|
$productData['shopId'] = $shopId;
|
|
|
$productData['itemId'] = $currentItem['id'];
|
|
|
$productData['classId'] = $ghsClassId;
|
|
|
@@ -190,13 +192,11 @@ class ItemService extends BaseService
|
|
|
//花材默认是下架状态
|
|
|
$productData['status'] = 2;
|
|
|
$productAddData[] = $productData;
|
|
|
-
|
|
|
}
|
|
|
if (empty($itemAddData)) {
|
|
|
continue;
|
|
|
}
|
|
|
ProductClass::batchAdd($productAddData);
|
|
|
-
|
|
|
}
|
|
|
//2021-5-7 增加默认分类
|
|
|
$classData = [
|