From d03b3528b6ee15f6e39ab5a6ece6e5dbd87a390d Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Wed, 11 Dec 2019 10:43:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=95=86=E5=93=81=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E6=A8=A1=E5=9E=8B=E4=BF=AE=E6=94=B9=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=94=AE=E5=80=BC=E5=AF=B9=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=99=A4=E5=8E=BB=E8=87=AA=E8=BA=AB?= =?UTF-8?q?=E5=8F=82=E6=95=B0=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/ShopCategory.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/modules/goods/models/ars/ShopCategory.php b/backend/modules/goods/models/ars/ShopCategory.php index 9f4e199..2d3c7d3 100755 --- a/backend/modules/goods/models/ars/ShopCategory.php +++ b/backend/modules/goods/models/ars/ShopCategory.php @@ -107,12 +107,13 @@ class ShopCategory 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()