|
|
@@ -179,4 +179,22 @@ class ProductController extends Controller
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //二个空间问题
|
|
|
+ public function actionEmpty()
|
|
|
+ {
|
|
|
+ ini_set('memory_limit', '5045M');
|
|
|
+ set_time_limit(0);
|
|
|
+ $list = PtItemClass::getAllByCondition(['delStatus' => 0], null, '*', null, true);
|
|
|
+ if (!empty($list)) {
|
|
|
+ foreach ($list as $item) {
|
|
|
+ $name = $item->name ?? '';
|
|
|
+ $name = trim($name);
|
|
|
+ $name = str_replace(" ", " ", $name);
|
|
|
+ $name = str_replace(" ", " ", $name);
|
|
|
+ $item->name = $name;
|
|
|
+ $item->save();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|