|
@@ -15,6 +15,9 @@ use app\jobs\BatchHandleJob;
|
|
|
use app\jobs\order\AutoOrderUnpaidCancelJob;
|
|
use app\jobs\order\AutoOrderUnpaidCancelJob;
|
|
|
use app\jobs\order\SpliteStoreOrderJob;
|
|
use app\jobs\order\SpliteStoreOrderJob;
|
|
|
use app\model\system\config\SystemConfig;
|
|
use app\model\system\config\SystemConfig;
|
|
|
|
|
+use app\model\user\User;
|
|
|
|
|
+use app\model\user\UserBill;
|
|
|
|
|
+use app\model\user\UserBrokerage;
|
|
|
use app\services\activity\combination\StorePinkServices;
|
|
use app\services\activity\combination\StorePinkServices;
|
|
|
use app\services\activity\coupon\StoreCouponIssueServices;
|
|
use app\services\activity\coupon\StoreCouponIssueServices;
|
|
|
use app\services\BaseServices;
|
|
use app\services\BaseServices;
|
|
@@ -29,6 +32,7 @@ use app\services\store\finance\StoreFinanceFlowServices;
|
|
|
use app\services\store\SystemStoreServices;
|
|
use app\services\store\SystemStoreServices;
|
|
|
use app\services\system\config\ConfigServices;
|
|
use app\services\system\config\ConfigServices;
|
|
|
use app\services\system\form\SystemFormServices;
|
|
use app\services\system\form\SystemFormServices;
|
|
|
|
|
+use app\services\user\AwardIntegralServices;
|
|
|
use app\services\user\UserAwardIntegralServices;
|
|
use app\services\user\UserAwardIntegralServices;
|
|
|
use app\services\user\UserBrokerageServices;
|
|
use app\services\user\UserBrokerageServices;
|
|
|
use app\services\user\UserInvoiceServices;
|
|
use app\services\user\UserInvoiceServices;
|
|
@@ -1515,50 +1519,52 @@ HTML;
|
|
|
'total' => $total_user . '人',
|
|
'total' => $total_user . '人',
|
|
|
'date' => '今日'
|
|
'date' => '今日'
|
|
|
];
|
|
];
|
|
|
- $integralService = app()->make(UserAwardIntegralServices::class);
|
|
|
|
|
|
|
|
|
|
- $today = $integralService->getLake('today');
|
|
|
|
|
- $yesterday = $integralService->getLake('yesterday');
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $integralService = app()->make(AwardIntegralServices::class);
|
|
|
|
|
+
|
|
|
|
|
+ $today = $integralService->getIntegralSum(['add_time_date' => 'today']);
|
|
|
|
|
+ $yesterday = $integralService->getIntegralSum(['add_time_date' => 'yesterday']);
|
|
|
$today_ratio = $this->countRate($today, $yesterday);
|
|
$today_ratio = $this->countRate($today, $yesterday);
|
|
|
$lack = [
|
|
$lack = [
|
|
|
'today' => $today,
|
|
'today' => $today,
|
|
|
'yesterday' => $yesterday,
|
|
'yesterday' => $yesterday,
|
|
|
'today_ratio' => $today_ratio,
|
|
'today_ratio' => $today_ratio,
|
|
|
- 'total' => $integralService->getLake() . '元',
|
|
|
|
|
|
|
+ 'total' => $integralService->getIntegralSum(['add_time_date' => 'month']),
|
|
|
'date' => '今日'
|
|
'date' => '今日'
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
- $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 = UserBrokerage::where('pm', 1)->whereTime('add_time', 'today')->sum('number');
|
|
|
|
|
+ $yesterday = UserBrokerage::where('pm', 1)->whereTime('add_time', 'yesterday')->sum('number');
|
|
|
$today_ratio = $this->countRate($today, $yesterday);
|
|
$today_ratio = $this->countRate($today, $yesterday);
|
|
|
- $a_integral = [
|
|
|
|
|
|
|
+ $s_integral = [
|
|
|
'today' => $today,
|
|
'today' => $today,
|
|
|
'yesterday' => $yesterday,
|
|
'yesterday' => $yesterday,
|
|
|
'today_ratio' => $today_ratio,
|
|
'today_ratio' => $today_ratio,
|
|
|
- 'total' => $integralService->getIntegralSum(['status' => 0, 'type' => 0]),
|
|
|
|
|
|
|
+ 'total' => User::sum('brokerage_price'),
|
|
|
'date' => '今日'
|
|
'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 = UserBill::where('category', 'integral')->where('pm', 1)->whereTime('add_time', 'today')->sum('number');
|
|
|
|
|
+ $yesterday = UserBill::where('category', 'integral')->where('pm', 1)->whereTime('add_time', 'yesterday')->sum('number');
|
|
|
$today_ratio = $this->countRate($today, $yesterday);
|
|
$today_ratio = $this->countRate($today, $yesterday);
|
|
|
- $s_integral = [
|
|
|
|
|
|
|
+ $a_integral = [
|
|
|
'today' => $today,
|
|
'today' => $today,
|
|
|
'yesterday' => $yesterday,
|
|
'yesterday' => $yesterday,
|
|
|
'today_ratio' => $today_ratio,
|
|
'today_ratio' => $today_ratio,
|
|
|
- 'total' => $integralService->getIntegralSum(['status' => 0, 'type' => 1]),
|
|
|
|
|
|
|
+ 'total' => User::sum('integral'),
|
|
|
'date' => '今日'
|
|
'date' => '今日'
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
- $today = $integralService->getPrice();
|
|
|
|
|
- $yesterday = $integralService->search()->whereTime('add_time', 'yesterday')->order('add_time', 'desc')->value('price');
|
|
|
|
|
|
|
+ $today = UserBill::where('category', 'energy')->where('pm', 1)->whereTime('add_time', 'today')->sum('number');
|
|
|
|
|
+ $yesterday = UserBill::where('category', 'energy')->where('pm', 1)->whereTime('add_time', 'yesterday')->sum('number');
|
|
|
$today_ratio = $this->countRate($today, $yesterday);
|
|
$today_ratio = $this->countRate($today, $yesterday);
|
|
|
$l_price = [
|
|
$l_price = [
|
|
|
'today' => $today,
|
|
'today' => $today,
|
|
|
'yesterday' => $yesterday,
|
|
'yesterday' => $yesterday,
|
|
|
'today_ratio' => $today_ratio,
|
|
'today_ratio' => $today_ratio,
|
|
|
- 'total' => $today . '元',
|
|
|
|
|
|
|
+ 'total' => User::sum('energy'),
|
|
|
'date' => '今日'
|
|
'date' => '今日'
|
|
|
];
|
|
];
|
|
|
|
|
|
|
@@ -1567,18 +1573,18 @@ HTML;
|
|
|
$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[5]['title'] = '消费分';
|
|
|
- $info[6]['title'] = '贡献分';
|
|
|
|
|
- $info[7]['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[5]['total_name'] = '剩余消费分';
|
|
|
- $info[6]['total_name'] = '剩余贡献分';
|
|
|
|
|
- $info[7]['total_name'] = '当前参考值';
|
|
|
|
|
|
|
+ $info[6]['total_name'] = '剩余佣金';
|
|
|
|
|
+ $info[7]['total_name'] = '剩余能量值';
|
|
|
return $info;
|
|
return $info;
|
|
|
}
|
|
}
|
|
|
|
|
|