diff --git a/app/controller/api/dataview/Product.php b/app/controller/api/dataview/Product.php index 7f124945..4ed13fbc 100644 --- a/app/controller/api/dataview/Product.php +++ b/app/controller/api/dataview/Product.php @@ -2,10 +2,8 @@ namespace app\controller\api\dataview; -use app\common\repositories\BaseRepository; -use app\common\repositories\store\order\StoreOrderRepository; -use app\common\repositories\system\merchant\MerchantRepository; -use app\common\repositories\user\UserRepository; + +use app\common\repositories\store\StoreCategoryRepository as repository; use app\common\repositories\user\UserVisitRepository; use crmeb\basic\BaseController; use think\App; @@ -23,7 +21,7 @@ class Product extends BaseController public $streetCode; // 镇街道地区码 - public function __construct(App $app, BaseRepository $repository) + public function __construct(App $app, repository $repository) { parent::__construct($app); $this->repository = $repository; @@ -277,4 +275,9 @@ class Product extends BaseController return (float)bcdiv(bcsub($today, $last, $scale), $last, $scale); } + public function productCategoryList() + { + return app('json')->success($this->repository->getFormatList($this->request->merId())); + } + } \ No newline at end of file diff --git a/route/api.php b/route/api.php index 8964e535..e39ded8f 100644 --- a/route/api.php +++ b/route/api.php @@ -731,14 +731,20 @@ Route::group('api/', function () { /**---------------------数据之眼可视化大屏api------------------- start */ - Route::get('user_merchat_count', 'User/userMerchantCount'); + + // Order Route::get('order_statistics', 'Order/orderStatistics'); Route::get('sales_ranking', 'Order/salesRanking'); Route::get('curr_day_order_amount', 'Order/currDayOrderAmount'); - Route::get('product_count', 'Product/productCount'); - Route::get('view_count', 'Product/viewCount'); + + // User + Route::get('user_merchat_count', 'User/userMerchantCount'); Route::get('user_trade_count', 'User/userTradeCount'); + // Product + Route::get('product_count', 'Product/productCount'); + Route::get('view_count', 'Product/viewCount'); + Route::get('product_category_list', 'Product/productCategoryList'); /**---------------------数据之眼可视化大屏api-------------------- end */