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()