From 2495e790c08dc305a1291634c545c1b530d3df95 Mon Sep 17 00:00:00 2001 From: liangyuyan <1103300295@qq.com> Date: Thu, 10 Sep 2020 20:06:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Forms/GoodsNewImageForm.php | 4 ++-- app/Console/Commands/MigrateStoreAccount.php | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/Admin/Forms/GoodsNewImageForm.php b/app/Admin/Forms/GoodsNewImageForm.php index 12427ed..f4e1e7f 100644 --- a/app/Admin/Forms/GoodsNewImageForm.php +++ b/app/Admin/Forms/GoodsNewImageForm.php @@ -42,8 +42,8 @@ class GoodsNewImageForm extends Form $banner->updated_at = time(); $banner->save(); } - - return $this->success('修改成功', '/goods_new'); + + return $this->error('修改成功'); } /** diff --git a/app/Console/Commands/MigrateStoreAccount.php b/app/Console/Commands/MigrateStoreAccount.php index f2ec97c..76ab4c6 100644 --- a/app/Console/Commands/MigrateStoreAccount.php +++ b/app/Console/Commands/MigrateStoreAccount.php @@ -40,11 +40,17 @@ class MigrateStoreAccount extends Command public function handle() { $m = ['120'=>['sort'=>'12'],'12'=>['sort'=>'3'],'112'=>['sort'=>'2'],'110'=>['sort'=>'120']]; - - - -var_dump($m); -return 0; + + $arr = []; + foreach ($m as $key=>$value){ + $arr[$value['sort']] = $value; + $arr[$value['sort']]['id'] = $key; + } + krsort($arr); + $b = array_column($arr,null,'id'); + // array_multisort($sort,SORT_DESC,SORT_NUMERIC,$m); + var_dump($b); + return 0; $oldTableName = 'ims_cjdc_store_account'; $newTableName = 'lanzu_financial_record'; // 判断表是否存在