<?php
|
|
namespace app\operations\controller\statistics;
|
|
use app\operations\controller\Controller;
|
use app\operations\service\statistics\ProductRankingService;
|
|
|
/**
|
* 数据控制器
|
*/
|
class Product extends Controller
|
{
|
/**
|
* 会员数据统计
|
*/
|
public function index()
|
{
|
$postData = $this->postData()["Params"];
|
return $this->renderSuccess('', [
|
// 商品数量占比
|
'productRanking' => (new ProductRankingService())->getProductRanking($postData),
|
// 商品金额占比
|
'productMoneyRanking' => (new ProductRankingService())->getProductMoneyRanking($postData),
|
// 商品分类占比
|
'categoryRanking' => (new ProductRankingService())->getCategoryRanking($postData),
|
// 会员等级占比
|
'gradeRanking' => (new ProductRankingService())->getGradeRanking($postData),
|
]);
|
}
|
|
}
|