From 79ec8930f1450ce06e35f8402613184745166ce0 Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Wed, 20 Nov 2019 13:42:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9antgoods=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E8=A7=84=E6=A0=BC=E6=A8=A1=E5=9D=97=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/antgoods/goods/src/models/ars/Attribute.php | 3 +++ .../antgoods/goods/src/models/searchs/AttributeSearch.php | 1 + vendor/antgoods/goods/src/views/attribute/_form.php | 2 -- vendor/antgoods/goods/src/views/attribute/create.php | 4 ++-- vendor/antgoods/goods/src/views/attribute/index.php | 2 +- vendor/antgoods/goods/src/views/attribute/update.php | 4 ++-- vendor/antgoods/goods/src/views/attribute/view.php | 7 +++---- vendor/antgoods/goods/src/views/goods/view.php | 4 ++-- vendor/antgoods/goods/src/views/shopcategory/view.php | 4 ++-- 9 files changed, 16 insertions(+), 15 deletions(-) diff --git a/vendor/antgoods/goods/src/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php index c68e652..c3b2675 100644 --- a/vendor/antgoods/goods/src/models/ars/Attribute.php +++ b/vendor/antgoods/goods/src/models/ars/Attribute.php @@ -19,6 +19,9 @@ use yii\behaviors\TimestampBehavior; */ class Attribute 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/AttributeSearch.php b/vendor/antgoods/goods/src/models/searchs/AttributeSearch.php index f5cc763..b06e242 100644 --- a/vendor/antgoods/goods/src/models/searchs/AttributeSearch.php +++ b/vendor/antgoods/goods/src/models/searchs/AttributeSearch.php @@ -118,6 +118,7 @@ class AttributeSearch extends Attribute * 条件筛选 */ private function filter($query, $dataProvider){ + $query->andFilterWhere(['is_delete' => Attribute::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/views/attribute/_form.php b/vendor/antgoods/goods/src/views/attribute/_form.php index 7d6644c..75c5ddf 100644 --- a/vendor/antgoods/goods/src/views/attribute/_form.php +++ b/vendor/antgoods/goods/src/views/attribute/_form.php @@ -20,8 +20,6 @@ use yii\widgets\ActiveForm; = $form->field($model, 'sort_order')->textInput() ?> - = $form->field($model, 'is_delete')->textInput() ?> -