| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace addons\Happiness\agent\controllers;
- use addons\Happiness\common\service\StoreService;
- /**
- * 资产统计
- */
- class StoreStatisticsController extends BaseController
- {
- /**
- * 资产统计
- *
- * @return string
- */
- public function actionIndex(): string
- {
- return $this->render('index');
- }
- /**
- * 收入明细
- *
- * @return mixed
- */
- public function actionIncomeLog()
- {
- if (!\Yii::$app->request->isAjax) {
- return $this->render($this->action->id);
- }
- $params = $this->request->get();
- if (empty($params['store_id'])) {
- return $this->error('门店参数不存在');
- }
- $info = (new StoreService(['mall_id' => $this->mall_id, 'store_id' => $params['store_id']]))->getIncomeLogList($params, $this->pageSize);
- return $this->success('success', $info);
- }
- }
|