BookCustomController.php 772 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace ghs\controllers;
  3. use bizGhs\book\classes\BookCustomClass;
  4. use common\components\util;
  5. use Yii;
  6. class BookCustomController extends BaseController
  7. {
  8. //预订客户列表 ssh 20240616
  9. public function actionList()
  10. {
  11. $get = Yii::$app->request->get();
  12. $where = [];
  13. $where['mainId'] = $this->mainId;
  14. $bookSn = $get['bookSn'] ?? '';
  15. if (empty($bookSn)) {
  16. $shop = $this->shop;
  17. $bookSn = $shop->bookSn ?? 0;
  18. if (empty($bookSn)) {
  19. util::fail('请选择预订活动');
  20. }
  21. }
  22. $where['bookSn'] = $bookSn;
  23. $list = BookCustomClass::getAllByCondition($where, 'addTime DESC', '*');
  24. util::success(['list' => $list]);
  25. }
  26. }