| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace ghs\controllers;
- use biz\stat\classes\StatKdClass;
- use biz\stat\classes\StatRefundClass;
- use common\components\dateUtil;
- use Yii;
- use common\components\util;
- class StatKdController extends BaseController
- {
- //开单收入统计 shish 20211017
- public function actionProfile()
- {
- $get = Yii::$app->request->get();
- $where = [];
- $where['shopId'] = $this->shopId;
- if (isset($get['shopId']) && !empty($get['shopId'])) {
- $where['shopId'] = $get['shopId'];
- }
- $selectTime = $get['selectTime'] ?? 'thisMonth';
- if (!empty($selectTime)) {
- $startTime = $get['startTime'] ?? '';
- $endTime = $get['endTime'] ?? '';
- $period = dateUtil::formatTime($selectTime, $startTime, $endTime, true);
- $where['time'] = ['between', [$period['startTime'], $period['endTime']]];
- }
- $kdList = StatKdClass::getAllByCondition($where, null, '*');
- $refundList = StatRefundClass::getAllByCondition($where, null, '*');
- }
- }
|