| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace backend\modules\admin\controllers;
- use backend\controllers\AdminController;
- use backend\modules\admin\services\SystemService;
- use Yii;
- /**
- * 系统任务管理
- * Namespace backend\modules\admin\controllers
- * @Author:lun
- * @Date:2024-09-18 17:59
- * @Copyright:copyright(c)2024 广东七件事集团
- */
- class SystemController extends AdminController
- {
- /**
- * 获取系统状态
- * @Author:lun
- * @Date:2024-09-18 17:59
- * @Copyright:copyright(c)2024 广东七件事集团
- * @return mixed|string|null
- */
- public function actionGetSystemInfo()
- {
- $request = Yii::$app->request;
- if ($request->isAjax && $request->isPost) {
- $data = SystemService::getSystemConfig();
- if ($data['status'] == 0) return $this->error($data['msg']);
- return $this->success('获取成功', $data['data']);
- }
- }
- public function actionGetWraparound()
- {
- return $this->success('获取成功', SystemService::getWraparound());
- }
- public function actionGetSaleTrend()
- {
- return $this->success('获取成功', SystemService::getSaleTrend());
- }
- public function actionGetSaleTrendMonth()
- {
- $type = Yii::$app->request->get('type', 'month');
- return $this->success('获取成功', SystemService::getSaleTrendByMonth($type));
- }
- }
|