shish 3 лет назад
Родитель
Сommit
c345fd58ab
1 измененных файлов с 26 добавлено и 0 удалено
  1. 26 0
      app-hd/controllers/PriceChangeController.php

+ 26 - 0
app-hd/controllers/PriceChangeController.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace hd\controllers;
+
+use bizHd\item\classes\PriceChangeClass;
+use bizHd\product\classes\ProductClass;
+use common\components\util;
+use Yii;
+
+class PriceChangeController extends BaseController
+{
+
+    public function actionList()
+    {
+        $get = Yii::$app->request->get();
+        $id = $get['id'] ?? 0;
+        $product = ProductClass::getById($id, true);
+        if ($product->mainId != $this->mainId) {
+            util::fail('没有权限');
+        }
+        $where = ['itemId' => $id];
+        $list = PriceChangeClass::getChangeList($where);
+        util::success($list);
+    }
+
+}