|
|
@@ -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('取消成功');
|
|
|
+ }
|
|
|
+
|
|
|
}
|