Răsfoiți Sursa

取消特价

shish 9 luni în urmă
părinte
comite
8353d0b498
1 a modificat fișierele cu 13 adăugiri și 0 ștergeri
  1. 13 0
      app-hd/controllers/ProductController.php

+ 13 - 0
app-hd/controllers/ProductController.php

@@ -991,4 +991,17 @@ class ProductController extends BaseController
         util::complete('修改成功');
     }
 
+    public function actionCancelDiscount()
+    {
+        $get = Yii::$app->request->get();
+        $id = $get['id'] ?? 0;
+        $info = ProductClass::getById($id, true);
+        ProductClass::check($info, $this->mainId);
+        $info->discountPrice = 0;
+        $info->skDiscountPrice = 0;
+        $info->hjDiscountPrice = 0;
+        $info->save();
+        util::complete('取消成功');
+    }
+
 }