| 12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace addons\LuckyGroup\backend\controllers;
- use addons\LuckyGroup\common\models\LuckyGroupBonusLog;
- class BonusLogController extends BaseController
- {
- public function actionIndex()
- {
- if (\Yii::$app->request->isAjax) {
- if (\Yii::$app->request->isGet) {
- $params = \Yii::$app->request->get();
- $where = [];
- $where[] = ['mall_id' => $this->mall_id];
- if (!empty($params['date_start'])) $where[] = ['>=', 'created_at', strtotime($params['date_start'])];
- if (!empty($params['date_end'])) $where[] = ['<=', 'created_at', strtotime($params['date_end'])];
- $params['where'] = $where;
- $params['order'] = 'id desc';
- $list = LuckyGroupBonusLog::listPage($params);
- return $this->success('success', $list);
- }
- } else {
- return $this->render('index');
- }
- }
- }
|