diff --git a/vendor/antgoods/goods/src/models/ars/Brand.php b/vendor/antgoods/goods/src/models/ars/Brand.php index a225e59..bf681bd 100644 --- a/vendor/antgoods/goods/src/models/ars/Brand.php +++ b/vendor/antgoods/goods/src/models/ars/Brand.php @@ -16,6 +16,9 @@ use yii\behaviors\TimestampBehavior; */ class Brand extends \yii\db\ActiveRecord { + //是否删除is_delete + const IS_DELETE_NO = 0;//未删除 + const IS_DELETE_YES = 1;//已删除 /** * {@inheritdoc} */ diff --git a/vendor/antgoods/goods/src/models/ars/Goods.php b/vendor/antgoods/goods/src/models/ars/Goods.php index 841efc8..2434e83 100644 --- a/vendor/antgoods/goods/src/models/ars/Goods.php +++ b/vendor/antgoods/goods/src/models/ars/Goods.php @@ -44,6 +44,9 @@ use yii\behaviors\TimestampBehavior; */ class Goods extends \yii\db\ActiveRecord { + //是否删除is_delete + const IS_DELETE_NO = 0;//未删除 + const IS_DELETE_YES = 1;//已删除 /** * {@inheritdoc} */ diff --git a/vendor/antgoods/goods/src/models/searchs/BrandSearch.php b/vendor/antgoods/goods/src/models/searchs/BrandSearch.php index f7fc35e..e484b56 100644 --- a/vendor/antgoods/goods/src/models/searchs/BrandSearch.php +++ b/vendor/antgoods/goods/src/models/searchs/BrandSearch.php @@ -114,6 +114,7 @@ class BrandSearch extends Brand * 条件筛选 */ private function filter($query, $dataProvider){ + $query->andFilterWhere(['is_delete' => Brand::IS_DELETE_NO]); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); diff --git a/vendor/antgoods/goods/src/models/searchs/CategorySearch.php b/vendor/antgoods/goods/src/models/searchs/CategorySearch.php index 7ed7c4f..cce94b0 100644 --- a/vendor/antgoods/goods/src/models/searchs/CategorySearch.php +++ b/vendor/antgoods/goods/src/models/searchs/CategorySearch.php @@ -121,7 +121,7 @@ class CategorySearch extends Category * 条件筛选 */ private function filter($query, $dataProvider){ - $query->andFilterWhere(['is_delete' => 0]); + $query->andFilterWhere(['is_delete' => Category::IS_DELETE_NO]); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); diff --git a/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php b/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php index 738cbf2..618b320 100644 --- a/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php +++ b/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php @@ -143,6 +143,7 @@ class GoodsSearch extends Goods * 条件筛选 */ private function filter($query, $dataProvider){ + $query->andFilterWhere(['is_delete' => Goods::IS_DELETE_NO]); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1');