|
|
@@ -84,4 +84,27 @@ class CgController extends Controller
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //更新名称和封面 ssh 20230317
|
|
|
+ public function actionUpdateName()
|
|
|
+ {
|
|
|
+ ini_set('memory_limit', '2045M');
|
|
|
+ set_time_limit(0);
|
|
|
+ $list = PurchaseItemClass::getAllByCondition(['id>' => 0], null, '*', null, true);
|
|
|
+ if (!empty($list)) {
|
|
|
+ foreach ($list as $item) {
|
|
|
+ $info = $item->itemInfo;
|
|
|
+ if (!empty($info)) {
|
|
|
+ $arr = json_decode($info, true);
|
|
|
+ $name = $arr['itemName'] ?? '';
|
|
|
+ $cover = $arr['itemCover'] ?? '';
|
|
|
+ if (!empty($name)) {
|
|
|
+ $item->name = $name;
|
|
|
+ $item->cover = $cover;
|
|
|
+ $item->save();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|