shish há 3 anos atrás
pai
commit
c345fd58ab
1 ficheiros alterados com 26 adições e 0 exclusões
  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);
+    }
+
+}