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