|
|
@@ -3,6 +3,7 @@
|
|
|
namespace business\controllers;
|
|
|
|
|
|
use biz\merchant\services\MerchantAssetService;
|
|
|
+use biz\stat\services\StatIncomeMonthService;
|
|
|
use biz\stat\services\StatIncomeService;
|
|
|
use biz\stat\services\StatOrderService;
|
|
|
use biz\stat\services\StatUserService;
|
|
|
@@ -32,12 +33,19 @@ class ConsoleController extends BaseController
|
|
|
//今天收入
|
|
|
$incomeData = StatIncomeService::getTodayNum($this->merchantId);
|
|
|
$todayIncome = isset($incomeData['amount']) ? $incomeData['amount'] : 0;
|
|
|
-
|
|
|
$todayData = ['visit' => $todayVisit, 'fans' => $todayFansNum, 'user' => $todayUserNum, 'income' => $todayIncome, 'order' => $todayOrder];
|
|
|
+
|
|
|
+ //当月的收入
|
|
|
+ $currentMonthIncome = StatIncomeMonthService::getCurrentMonthIncome($this->merchantId);
|
|
|
+ //上个月收入
|
|
|
+ $previousMonthIncome = StatIncomeMonthService::getPreviousMonthIncome($this->merchantId);
|
|
|
+ //最近7天收入变化趋势
|
|
|
+ $latestIncome = StatIncomeService::getLatestSevenDay($this->merchantId);
|
|
|
$incomeStat = [
|
|
|
- 'month' => 1999,
|
|
|
+ 'month' => $currentMonthIncome,
|
|
|
'week' => 999,
|
|
|
- 'list' => ['7.1' => 100, '7.2' => 200, '7.3' => 300, '7.4' => 400, '7.5' => 500],
|
|
|
+ 'previousMonth' => $previousMonthIncome,
|
|
|
+ 'list' => $latestIncome,
|
|
|
];
|
|
|
$visitStat = [
|
|
|
'month' => 1999,
|