Browse Source

取消特价

shish 4 years ago
parent
commit
3371f560d0
1 changed files with 12 additions and 0 deletions
  1. 12 0
      app-ghs/controllers/ProductController.php

+ 12 - 0
app-ghs/controllers/ProductController.php

@@ -26,6 +26,18 @@ class ProductController extends BaseController
 
     public $guestAccess = ['index'];
 
+    //取消特价 ssh 20220901
+    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->save();
+        util::complete();
+    }
+
     //打印花材的标签 ssh 20220602
     public function actionPrint()
     {