63 lines
2.0 KiB
PHP
63 lines
2.0 KiB
PHP
<?php
|
|
namespace admin\controllers\dashboard;
|
|
use admin\components\BaseAdminController;
|
|
use admin\models\forms\statistics\DataForm;
|
|
use common\models\Order;
|
|
use yii\web\Response;
|
|
|
|
/**
|
|
* @doc-module 工作台
|
|
*/
|
|
class IndexController extends BaseAdminController
|
|
{
|
|
|
|
/**
|
|
* @doc-name 头部数据
|
|
* @doc-return mixed @Total_data{@Today{order_num-int-今日订单数,total_pay_price-double-今日支付金额,user_num-int-今日用户数},@Yestoday-mixed-昨日比较{*_status-string-昨日比较up上升down下降equal相等,*_abs-int-差额},@Lastweek-mixed-上周比较{*_status-string-上周比较up上升down下降equal相等,*_abs-int-差额}} 今日数据
|
|
* @doc-return mixed @Wait_data{wait_send_num-int-待发货数量,wait_refund_num-int-待处理退款储量} wait数据
|
|
*/
|
|
public function actionAllData()
|
|
{
|
|
$form = new DataForm();
|
|
$form->attributes = \Yii::$app->request->get();
|
|
$form->attributes = \Yii::$app->request->post();
|
|
return $form->data_search();
|
|
}
|
|
|
|
|
|
/**
|
|
* @doc-name 销量排行榜
|
|
* @doc-return mixed @Week_top_list{num-int-销量,brand-string-品牌,name-string-商品名称} 近7天
|
|
* @doc-return mixed @Mouth_top_list{num-int-销量,brand-string-品牌,name-string-商品名称} 近30天
|
|
*/
|
|
public function actionSalesTop()
|
|
{
|
|
$form = new DataForm();
|
|
$form->attributes = \Yii::$app->request->get();
|
|
$form->attributes = \Yii::$app->request->post();
|
|
return $form->sales_top();
|
|
}
|
|
|
|
|
|
/**
|
|
* @doc-name 图表
|
|
* @doc-param string date_start 开始时间YYMMDD
|
|
* @doc-param string date_end 开始时间YYMMDD
|
|
* @doc-return string created_at 日期
|
|
* @doc-return int order_num 订单数量
|
|
* @doc-return double total_pay_price 支付金额
|
|
* @return mixed
|
|
*/
|
|
public function actionTable()
|
|
{
|
|
$form = new DataForm();
|
|
$form->attributes = \Yii::$app->request->get();
|
|
$form->attributes = \Yii::$app->request->post();
|
|
return $form->table_search();
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|