From b809932515d14ffca829e419c8c68f25d5330a7a Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Wed, 20 Nov 2019 10:42:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AEantgoods=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=93=81=E7=89=8C=EF=BC=8C=E5=88=86=E7=B1=BB=EF=BC=8C=E5=95=86?= =?UTF-8?q?=E5=93=81=E7=9A=84=E5=88=A0=E9=99=A4=E5=AD=97=E6=AE=B5=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E6=A3=80=E7=B4=A2=E6=98=BE=E7=A4=BA=E6=98=AF=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=B7=B2=E5=88=A0=E9=99=A4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/antgoods/goods/src/models/ars/Brand.php | 3 +++ vendor/antgoods/goods/src/models/ars/Goods.php | 3 +++ vendor/antgoods/goods/src/models/searchs/BrandSearch.php | 1 + vendor/antgoods/goods/src/models/searchs/CategorySearch.php | 2 +- vendor/antgoods/goods/src/models/searchs/GoodsSearch.php | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) 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');