Browse Source

feat:商品模型增加保存排序行为

antshop
linyaostalker 5 years ago
parent
commit
342540009e
  1. 3
      backend/modules/goods/models/ars/Goods.php

3
backend/modules/goods/models/ars/Goods.php

@ -237,6 +237,9 @@ class Goods extends \yii\db\ActiveRecord
if (!$this->limit_count) { if (!$this->limit_count) {
$this->limit_count = 0; $this->limit_count = 0;
} }
if (!$this->sort_order) {
$this->sort_order = 999;
}
return parent::beforeSave($insert); // TODO: Change the autogenerated stub return parent::beforeSave($insert); // TODO: Change the autogenerated stub
} }

Loading…
Cancel
Save