diff --git a/backend/modules/goods/models/ars/ShopCategory.php b/backend/modules/goods/models/ars/ShopCategory.php index 2d3c7d3..3ec719c 100755 --- a/backend/modules/goods/models/ars/ShopCategory.php +++ b/backend/modules/goods/models/ars/ShopCategory.php @@ -120,4 +120,12 @@ class ShopCategory extends \yii\db\ActiveRecord { return $this->hasOne(File::className(), ['id' => 'icon']); } + + public function beforeSave($insert) + { + if ($this->filter_attr != null && is_array($this->filter_attr)) { + $this->filter_attr = implode(',', $this->filter_attr); + } + return parent::beforeSave($insert); // TODO: Change the autogenerated stub + } }