| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace hd\controllers;
- use biz\shop\classes\ShopYeChangeClass;
- use common\components\dict;
- use common\components\util;
- use Yii;
- class ShopYeChangeController extends BaseController
- {
- public $guestAccess = [];
- public function actionList()
- {
- $get = Yii::$app->request->get();
- $status = $get['status'] ?? 0;
- $where = [];
- if (!empty($status)) {
- $where['status'] = $status;
- }
- $where['mainId'] = $this->mainId;
- $tx = $get['tx'] ?? 0;
- if (!empty($tx)) {
- $where['tx'] = $tx;
- }
- // 事件类型
- if (isset($get['capitalType']) && $get['capitalType'] !== '') {
- $where['capitalType'] = (int)$get['capitalType'];
- }
- // 收支类型筛选:1 收入,0 支出;未传参时不筛选
- if (isset($get['io']) && $get['io'] !== '') {
- $where['io'] = (int)$get['io'];
- }
- $list = ShopYeChangeClass::getChangeList($where);
- util::success($list);
- }
- }
|