fix: 修复绑定手机号统计逻辑,确保用户唯一性计数
This commit is contained in:
parent
77e14921a1
commit
b21a112022
|
@ -65,7 +65,7 @@ class DashboardController
|
||||||
$login = User::whereBetween('login_time', [ $startOfDay, $endOfDay])->count();
|
$login = User::whereBetween('login_time', [ $startOfDay, $endOfDay])->count();
|
||||||
$registration = User::whereBetween('created_at', [ \Carbon\Carbon::createFromTimestamp($startOfDay)->toDateTimeString(), \Carbon\Carbon::createFromTimestamp($endOfDay)->toDateTimeString()])->count();
|
$registration = User::whereBetween('created_at', [ \Carbon\Carbon::createFromTimestamp($startOfDay)->toDateTimeString(), \Carbon\Carbon::createFromTimestamp($endOfDay)->toDateTimeString()])->count();
|
||||||
$withdraw=Withdraw::whereBetween('createtime2', [ \Carbon\Carbon::createFromTimestamp($startOfDay)->toDateTimeString(), \Carbon\Carbon::createFromTimestamp($endOfDay)->toDateTimeString()])->count();;
|
$withdraw=Withdraw::whereBetween('createtime2', [ \Carbon\Carbon::createFromTimestamp($startOfDay)->toDateTimeString(), \Carbon\Carbon::createFromTimestamp($endOfDay)->toDateTimeString()])->count();;
|
||||||
$binding=UserPhone::whereBetween('created_at', [ \Carbon\Carbon::createFromTimestamp($startOfDay)->toDateTimeString(), \Carbon\Carbon::createFromTimestamp($endOfDay)->toDateTimeString()])->groupBy('user_id')->count();
|
$binding=UserPhone::whereBetween('created_at', [ \Carbon\Carbon::createFromTimestamp($startOfDay)->toDateTimeString(), \Carbon\Carbon::createFromTimestamp($endOfDay)->toDateTimeString()])->distinct('user_id')->count('user_id');
|
||||||
$res['login']=$login;
|
$res['login']=$login;
|
||||||
$res['registration']=$registration;
|
$res['registration']=$registration;
|
||||||
$res['withdraw']=$withdraw;
|
$res['withdraw']=$withdraw;
|
||||||
|
|
Loading…
Reference in New Issue