statistic.php 5.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. use think\facade\Route;
  12. /**
  13. * 分销管理 相关路由
  14. */
  15. Route::group('statistic', function () {
  16. /** 用户统计 */
  17. Route::group(function () {
  18. //用户基础
  19. Route::get('user/get_basic', 'v1.statistic.UserStatistic/getBasic')->option(['real_name' => '用户基础统计']);
  20. //用户增长趋势
  21. Route::get('user/get_trend', 'v1.statistic.UserStatistic/getTrend')->option(['real_name' => '用户增长趋势']);
  22. //微信用户
  23. Route::get('user/get_wechat', 'v1.statistic.UserStatistic/getWechat')->option(['real_name' => '微信用户统计']);
  24. //微信用户成长趋势
  25. Route::get('user/get_wechat_trend', 'v1.statistic.UserStatistic/getWechatTrend')->option(['real_name' => '微信用户成长趋势']);
  26. //用户地域排行
  27. Route::get('user/get_region', 'v1.statistic.UserStatistic/getRegion')->option(['real_name' => '用户地域排行']);
  28. //用户性别
  29. Route::get('user/get_sex', 'v1.statistic.UserStatistic/getSex')->option(['real_name' => '用户性别分布']);
  30. //商品数据导出
  31. Route::get('user/get_excel', 'v1.statistic.UserStatistic/getExcel')->option(['real_name' => '用户数据导出']);
  32. })->option(['parent' => 'statistic', 'cate_name' => '用户统计']);
  33. /** 商品统计 */
  34. Route::group(function () {
  35. //商品基础
  36. Route::get('product/get_basic', 'v1.statistic.ProductStatistic/getBasic')->option(['real_name' => '商品基础统计']);
  37. //商品趋势
  38. Route::get('product/get_trend', 'v1.statistic.ProductStatistic/getTrend')->option(['real_name' => '商品趋势']);
  39. //商品排行
  40. Route::get('product/get_product_ranking', 'v1.statistic.ProductStatistic/getProductRanking')->option(['real_name' => '商品排行']);
  41. //商品数据导出
  42. Route::get('product/get_excel', 'v1.statistic.ProductStatistic/getExcel')->option(['real_name' => '商品数据导出']);
  43. })->option(['parent' => 'statistic', 'cate_name' => '商品统计']);
  44. /** 交易统计 */
  45. Route::group(function () {
  46. //今日营业额统计
  47. Route::get('trade/top_trade', 'v1.statistic.TradeStatistic/topTrade')->option(['real_name' => '今日营业额统计']);
  48. Route::get('trade/bottom_trade', 'v1.statistic.TradeStatistic/bottomTrade')->option(['real_name' => '交易统计底部数据']);
  49. })->option(['parent' => 'statistic', 'cate_name' => '交易统计']);
  50. /** 订单统计 */
  51. Route::group(function () {
  52. //订单基础
  53. Route::get('order/get_basic', 'v1.statistic.OrderStatistic/getBasic')->option(['real_name' => '订单基础统计']);
  54. //订单趋势
  55. Route::get('order/get_trend', 'v1.statistic.OrderStatistic/getTrend')->option(['real_name' => '订单趋势']);
  56. //订单来源
  57. Route::get('order/get_channel', 'v1.statistic.OrderStatistic/getChannel')->option(['real_name' => '订单来源']);
  58. //订单类型
  59. Route::get('order/get_type', 'v1.statistic.OrderStatistic/getType')->option(['real_name' => '订单类型']);
  60. })->option(['parent' => 'statistic', 'cate_name' => '订单统计']);
  61. /** 资金流水 */
  62. Route::group(function () {
  63. Route::get('flow/get_list', 'v1.statistic.FlowStatistic/getFlowList')->option(['real_name' => '资金流水']);
  64. Route::post('flow/set_mark/:id', 'v1.statistic.FlowStatistic/setMark')->option(['real_name' => '设置备注']);
  65. Route::get('flow/get_record', 'v1.statistic.FlowStatistic/getFlowRecord')->option(['real_name' => '账单记录']);
  66. })->option(['parent' => 'statistic', 'cate_name' => '资金流水']);
  67. /** 余额统计 */
  68. Route::group(function () {
  69. //余额基础统计
  70. Route::get('balance/get_basic', 'v1.statistic.BalanceStatistic/getBasic')->option(['real_name' => '余额基础统计']);
  71. //余额趋势
  72. Route::get('balance/get_trend', 'v1.statistic.BalanceStatistic/getTrend')->option(['real_name' => '余额趋势']);
  73. //余额来源
  74. Route::get('balance/get_channel', 'v1.statistic.BalanceStatistic/getChannel')->option(['real_name' => '余额来源']);
  75. //余额消耗
  76. Route::get('balance/get_type', 'v1.statistic.BalanceStatistic/getType')->option(['real_name' => '余额消耗']);
  77. })->option(['parent' => 'statistic', 'cate_name' => '余额统计']);
  78. })->middleware([
  79. \app\http\middleware\AllowOriginMiddleware::class,
  80. \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
  81. \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
  82. \app\adminapi\middleware\AdminLogMiddleware::class
  83. ])->option(['mark' => 'statistic', 'mark_name' => '程序统计']);