PriceChangeController.php 605 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace ghs\controllers;
  3. use bizGhs\item\classes\PriceChangeClass;
  4. use bizGhs\product\classes\ProductClass;
  5. use common\components\util;
  6. use Yii;
  7. class PriceChangeController extends BaseController
  8. {
  9. public function actionList()
  10. {
  11. $get = Yii::$app->request->get();
  12. $id = $get['id'] ?? 0;
  13. $product = ProductClass::getById($id, true);
  14. if ($product->mainId != $this->mainId) {
  15. util::fail('没有权限');
  16. }
  17. $where = ['itemId' => $id];
  18. $list = PriceChangeClass::getChangeList($where);
  19. util::success($list);
  20. }
  21. }