From 643f379261988f814a346e827be54eb743f744fa Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Wed, 11 Dec 2019 10:43:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=88=86=E7=B1=BB=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E4=BF=AE=E6=94=B9=E7=94=9F=E6=88=90=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=94=AE=E5=80=BC=E5=AF=B9=E6=96=B9=E6=B3=95=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=99=A4=E5=8E=BB=E8=87=AA=E8=BA=AB=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= 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 1f013d1..16bf72f 100755 --- a/backend/modules/goods/models/ars/Category.php +++ b/backend/modules/goods/models/ars/Category.php @@ -99,12 +99,13 @@ class Category extends \yii\db\ActiveRecord } /** + * @param int $ownId * @return array * 数据键值对 */ - public static function modelColumn() + public static function modelColumn($ownId = 0) { - return $column = self::find()->select(['name'])->where(['is_delete' => self::IS_DELETE_NO])->indexBy('id')->column(); + return $column = self::find()->select(['name'])->where(['is_delete' => self::IS_DELETE_NO])->andWhere(['!=', 'id', $ownId])->indexBy('id')->column(); } public function getIconFile()