BookItemGhsController.php 667 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace ghs\controllers;
  3. use bizGhs\book\classes\BookItemCustomClass;
  4. use bizGhs\book\classes\BookItemGhsClass;
  5. use common\components\util;
  6. use Yii;
  7. class BookItemGhsController extends BaseController
  8. {
  9. public function actionList()
  10. {
  11. $get = Yii::$app->request->get();
  12. $where = [];
  13. $where['mainId'] = $this->mainId;
  14. $parentId = $get['parentId'] ?? 0;
  15. if (empty($parentId)) {
  16. util::fail('没有找到相关信息');
  17. }
  18. $where['parentId'] = $parentId;
  19. $list = BookItemGhsClass::getAllByCondition($where, 'addTime DESC', '*');
  20. util::success(['list' => $list]);
  21. }
  22. }