Browse Source

运费模板删除增加是否被使用判断

antshop
linyaostalker 5 years ago
parent
commit
9d885aeb4a
  1. 2
      backend/modules/shop/controllers/ExpressTemplateController.php

2
backend/modules/shop/controllers/ExpressTemplateController.php

@ -113,7 +113,7 @@ class ExpressTemplateController extends Controller
*/
public function actionDelete($id)
{
if (Goods::find()->where(['express_template' => $id])->count() == 0) {
if (Goods::find()->where(['express_template' => $id, 'is_delete' => Goods::IS_DELETE_NO])->count() == 0) {
$expressTemplateModel = $this->findModel($id);
ExpressArea::deleteAll(['express_template' => $expressTemplateModel->id]);
$expressTemplateModel->delete();

Loading…
Cancel
Save