|
|
@@ -19,8 +19,11 @@ class ProductController extends Controller
|
|
|
//复制花材 ssh 20240422
|
|
|
public function actionClone()
|
|
|
{
|
|
|
+ ini_set('memory_limit', '5045M');
|
|
|
+ set_time_limit(0);
|
|
|
+
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
- $shopId = 0;
|
|
|
+ $shopId = 23580;
|
|
|
} else {
|
|
|
$shopId = 36523;
|
|
|
}
|
|
|
@@ -29,7 +32,7 @@ class ProductController extends Controller
|
|
|
util::stop();
|
|
|
}
|
|
|
$mainId = $shop->mainId ?? 0;
|
|
|
- $productList = ProductClass::getAllByCondition(['mainId' => $mainId, 'classId' => ['in', [3548, 3187]]], null, '*');
|
|
|
+ $productList = ProductClass::getAllByCondition(['mainId' => $mainId, 'classId' => ['in', [64843, 64842, 64841, 64840, 64839, 64838]]], null, '*');
|
|
|
if (!empty($productList)) {
|
|
|
foreach ($productList as $post) {
|
|
|
$post['copy'] = 1;
|
|
|
@@ -51,10 +54,10 @@ class ProductController extends Controller
|
|
|
$b['py'] = stringUtil::py($b['name']);
|
|
|
\bizGhs\product\classes\ProductClass::addProduct($b, $shop);
|
|
|
|
|
|
- $ab = $post;
|
|
|
- $ab['name'] = $ab['name'] . ' AB级';
|
|
|
- $ab['py'] = stringUtil::py($ab['name']);
|
|
|
- \bizGhs\product\classes\ProductClass::addProduct($ab, $shop);
|
|
|
+// $ab = $post;
|
|
|
+// $ab['name'] = $ab['name'] . ' AB级';
|
|
|
+// $ab['py'] = stringUtil::py($ab['name']);
|
|
|
+// \bizGhs\product\classes\ProductClass::addProduct($ab, $shop);
|
|
|
|
|
|
$c = $post;
|
|
|
$c['name'] = $c['name'] . ' C级';
|