Browse Source

修改antgoods删除规则

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
6a7b0779a9
  1. 4
      vendor/antgoods/goods/src/controllers/AttributeController.php
  2. 4
      vendor/antgoods/goods/src/controllers/BrandController.php
  3. 4
      vendor/antgoods/goods/src/controllers/GoodsController.php
  4. 4
      vendor/antgoods/goods/src/controllers/ShopCategoryController.php
  5. 4
      vendor/antgoods/goods/src/controllers/SupplierController.php
  6. 2
      vendor/antgoods/goods/src/models/searchs/AttributeSearch.php
  7. 2
      vendor/antgoods/goods/src/models/searchs/BrandSearch.php
  8. 2
      vendor/antgoods/goods/src/models/searchs/CategorySearch.php
  9. 2
      vendor/antgoods/goods/src/models/searchs/GoodsSearch.php
  10. 8
      vendor/antgoods/goods/src/models/searchs/ShopCategorySearch.php
  11. 2
      vendor/antgoods/goods/src/models/searchs/SupplierSearch.php

4
vendor/antgoods/goods/src/controllers/AttributeController.php

@ -106,7 +106,9 @@ class AttributeController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
$model = $this->findModel($id);
$model->is_delete = Attribute::IS_DELETE_YES;
$model->save();
return $this->redirect(['index']);
}

4
vendor/antgoods/goods/src/controllers/BrandController.php

@ -105,7 +105,9 @@ class BrandController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
$model = $this->findModel($id);
$model->is_delete = Brand::IS_DELETE_YES;
$model->save();
return $this->redirect(['index']);
}

4
vendor/antgoods/goods/src/controllers/GoodsController.php

@ -140,7 +140,9 @@ class GoodsController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
$model = $this->findModel($id);
$model->is_delete = Goods::IS_DELETE_YES;
$model->save();
return $this->redirect(['index']);
}

4
vendor/antgoods/goods/src/controllers/ShopCategoryController.php

@ -153,7 +153,9 @@ class ShopCategoryController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
$model = $this->findModel($id);
$model->is_delete = ShopCategory::IS_DELETE_YES;
$model->save();
return $this->redirect(['index']);
}

4
vendor/antgoods/goods/src/controllers/SupplierController.php

@ -105,7 +105,9 @@ class SupplierController extends Controller
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
$model = $this->findModel($id);
$model->is_delete = Supplier::IS_DELETE_YES;
$model->save();
return $this->redirect(['index']);
}

2
vendor/antgoods/goods/src/models/searchs/AttributeSearch.php

@ -101,7 +101,7 @@ class AttributeSearch extends Attribute
*/
public function search($params)
{
$query = Attribute::find();
$query = Attribute::find()->where(['is_delete' => Attribute::IS_DELETE_NO]);
// add conditions that should always apply here

2
vendor/antgoods/goods/src/models/searchs/BrandSearch.php

@ -86,7 +86,7 @@ class BrandSearch extends Brand
*/
public function search($params)
{
$query = Brand::find();
$query = Brand::find()->where(['is_delete' => Brand::IS_DELETE_NO]);
// add conditions that should always apply here

2
vendor/antgoods/goods/src/models/searchs/CategorySearch.php

@ -114,7 +114,7 @@ class CategorySearch extends Category
*/
public function search($params)
{
$query = Category::find();
$query = Category::find()->where(['is_delete' => Category::IS_DELETE_NO]);
// add conditions that should always apply here

2
vendor/antgoods/goods/src/models/searchs/GoodsSearch.php

@ -160,7 +160,7 @@ class GoodsSearch extends Goods
*/
public function search($params)
{
$query = Goods::find();
$query = Goods::find()->where(['is_delete' => Goods::IS_DELETE_NO]);
// add conditions that should always apply here

8
vendor/antgoods/goods/src/models/searchs/ShopCategorySearch.php

@ -52,8 +52,9 @@ class ShopCategorySearch extends ShopCategory
'width' => '2%',
'align' => 'center'
],
'id',
'name',
'id',
'name',
'sort_order',
[
'class' => 'iron\grid\ActionColumn',
'align' => 'center',
@ -86,7 +87,8 @@ class ShopCategorySearch extends ShopCategory
*/
public function search($params)
{
$query = ShopCategory::find();
$query = ShopCategory::find()
->where(['is_delete' => ShopCategory::IS_DELETE_NO]);
// add conditions that should always apply here

2
vendor/antgoods/goods/src/models/searchs/SupplierSearch.php

@ -92,7 +92,7 @@ class SupplierSearch extends Supplier
*/
public function search($params)
{
$query = Supplier::find();
$query = Supplier::find()->where(['is_delete' => Supplier::IS_DELETE_NO]);
// add conditions that should always apply here

Loading…
Cancel
Save