| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace ghs\controllers;
- use bizGhs\book\classes\BookItemCustomClass;
- use common\components\util;
- use Yii;
- class BookItemCustomController extends BaseController
- {
- //预订客户列表 ssh 20240616
- public function actionList()
- {
- $get = Yii::$app->request->get();
- $where = [];
- $where['mainId'] = $this->mainId;
- $bookSn = $get['bookSn'] ?? '';
- if (empty($bookSn)) {
- $shop = $this->shop;
- $bookSn = $shop->bookSn ?? 0;
- if (empty($bookSn)) {
- util::fail('请选择预订活动');
- }
- }
- $where['bookSn'] = $bookSn;
- $customId = $get['customId'] ?? 0;
- if (!empty($customId)) {
- $where['customId'] = $customId;
- }
- $itemId = $get['itemId'] ?? 0;
- if (!empty($itemId)) {
- $where['itemId'] = $itemId;
- }
- $list = BookItemCustomClass::getAllByCondition($where, 'addTime DESC', '*');
- util::success(['list' => $list]);
- }
- }
|