From cfd5a922d36e96e3ffb8433ee0aae80f9e7e8747 Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Wed, 18 Dec 2019 08:55:47 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E4=BF=AE=E6=94=B9=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB=E8=8E=B7=E5=8F=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=94=AE=E5=80=BC=E5=AF=B9=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/modules/goods/models/ars/Category.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/modules/goods/models/ars/Category.php b/backend/modules/goods/models/ars/Category.php index 66c431c..6c9b073 100755 --- a/backend/modules/goods/models/ars/Category.php +++ b/backend/modules/goods/models/ars/Category.php @@ -101,10 +101,11 @@ class Category extends \yii\db\ActiveRecord /** * @param int $ownId + * @param int $needDefault * @return array * 数据键值对 */ - public static function modelColumn($ownId = 0) + public static function modelColumn($ownId = 0, $needDefault = 1) { $query = self::find()->where(['is_delete' => self::IS_DELETE_NO]); if ($ownId) { @@ -112,7 +113,7 @@ class Category extends \yii\db\ActiveRecord } $data = $query->asArray()->all(); $data = GoodsManager::btree($data); - $data = GoodsManager::constructDropList($data); + $data = GoodsManager::constructDropList($data, $needDefault); return $data; }