|
@@ -1517,28 +1517,68 @@ HTML;
|
|
|
];
|
|
];
|
|
|
$integralService = app()->make(UserAwardIntegralServices::class);
|
|
$integralService = app()->make(UserAwardIntegralServices::class);
|
|
|
|
|
|
|
|
|
|
+ $today = $integralService->getLake('today');
|
|
|
|
|
+ $yesterday = $integralService->getLake('yesterday');
|
|
|
|
|
+ $today_ratio = $this->countRate($today, $yesterday);
|
|
|
$lack = [
|
|
$lack = [
|
|
|
- 'today' => $integralService->getLake('today'),
|
|
|
|
|
- 'yesterday' => $integralService->getLake('yesterday'),
|
|
|
|
|
- 'today_ratio' => $this->countRate($integralService->getLake('today'), $integralService->getLake('yesterday')),
|
|
|
|
|
-// 'week' => $this_week_user,
|
|
|
|
|
-// 'last_week' => $last_week_user,
|
|
|
|
|
-// 'week_ratio' => $user_week_ratio,
|
|
|
|
|
|
|
+ 'today' => $today,
|
|
|
|
|
+ 'yesterday' => $yesterday,
|
|
|
|
|
+ 'today_ratio' => $today_ratio,
|
|
|
'total' => $integralService->getLake() . '元',
|
|
'total' => $integralService->getLake() . '元',
|
|
|
'date' => '今日'
|
|
'date' => '今日'
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
- $info = array_values(compact('sales', 'visits', 'order', 'user', 'lack'));
|
|
|
|
|
|
|
+ $today = $integralService->getIntegralSum(['time' => 'today', 'timeKey' => 'add_time', 'status' => 0, 'type' => 0]);
|
|
|
|
|
+ $yesterday = $integralService->getIntegralSum(['time' => 'yesterday', 'timeKey' => 'add_time', 'status' => 0, 'type' => 0]);
|
|
|
|
|
+ $today_ratio = $this->countRate($today, $yesterday);
|
|
|
|
|
+ $a_integral = [
|
|
|
|
|
+ 'today' => $today,
|
|
|
|
|
+ 'yesterday' => $yesterday,
|
|
|
|
|
+ 'today_ratio' => $today_ratio,
|
|
|
|
|
+ 'total' => $integralService->getIntegralSum(['status' => 0, 'type' => 0]),
|
|
|
|
|
+ 'date' => '今日'
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ $today = $integralService->getIntegralSum(['time' => 'today', 'timeKey' => 'add_time', 'status' => 0, 'type' => 1]);
|
|
|
|
|
+ $yesterday = $integralService->getIntegralSum(['time' => 'yesterday', 'timeKey' => 'add_time', 'status' => 0, 'type' => 1]);
|
|
|
|
|
+ $today_ratio = $this->countRate($today, $yesterday);
|
|
|
|
|
+ $s_integral = [
|
|
|
|
|
+ 'today' => $today,
|
|
|
|
|
+ 'yesterday' => $yesterday,
|
|
|
|
|
+ 'today_ratio' => $today_ratio,
|
|
|
|
|
+ 'total' => $integralService->getIntegralSum(['status' => 0, 'type' => 1]),
|
|
|
|
|
+ 'date' => '今日'
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ $today = $integralService->getPrice();
|
|
|
|
|
+ $yesterday = $integralService->getPrice($integralService->search()->whereTime('add_time', 'yesterday')->order('add_time', 'desc')->value('price'));
|
|
|
|
|
+ $today_ratio = $this->countRate($today, $yesterday);
|
|
|
|
|
+ $l_price = [
|
|
|
|
|
+ 'today' => $today,
|
|
|
|
|
+ 'yesterday' => $yesterday,
|
|
|
|
|
+ 'today_ratio' => $today_ratio,
|
|
|
|
|
+ 'total' => $today . '元',
|
|
|
|
|
+ 'date' => '今日'
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+ $info = array_values(compact('sales', 'visits', 'order', 'user', 'lack', 'a_integral', 's_integral', 'l_price'));
|
|
|
$info[0]['title'] = '销售额';
|
|
$info[0]['title'] = '销售额';
|
|
|
$info[1]['title'] = '用户访问量';
|
|
$info[1]['title'] = '用户访问量';
|
|
|
$info[2]['title'] = '订单量';
|
|
$info[2]['title'] = '订单量';
|
|
|
$info[3]['title'] = '新增用户';
|
|
$info[3]['title'] = '新增用户';
|
|
|
$info[4]['title'] = '资金池';
|
|
$info[4]['title'] = '资金池';
|
|
|
|
|
+ $info[5]['title'] = '消费分';
|
|
|
|
|
+ $info[6]['title'] = '贡献分';
|
|
|
|
|
+ $info[7]['title'] = '参考值';
|
|
|
$info[0]['total_name'] = '本月销售额';
|
|
$info[0]['total_name'] = '本月销售额';
|
|
|
$info[1]['total_name'] = '本月访问量';
|
|
$info[1]['total_name'] = '本月访问量';
|
|
|
$info[2]['total_name'] = '本月订单量';
|
|
$info[2]['total_name'] = '本月订单量';
|
|
|
$info[3]['total_name'] = '本月新增用户';
|
|
$info[3]['total_name'] = '本月新增用户';
|
|
|
$info[4]['total_name'] = '资金池累计';
|
|
$info[4]['total_name'] = '资金池累计';
|
|
|
|
|
+ $info[5]['total_name'] = '剩余消费分';
|
|
|
|
|
+ $info[6]['total_name'] = '剩余贡献分';
|
|
|
|
|
+ $info[7]['total_name'] = '当前参考值';
|
|
|
return $info;
|
|
return $info;
|
|
|
}
|
|
}
|
|
|
|
|
|