|
|
@@ -30,55 +30,25 @@ class Yesterdaydata extends AdminController
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @NodeAnotation(title="昨日数据列表")
|
|
|
+ * @NodeAnotation(title="后台数据列表")
|
|
|
*/
|
|
|
public function index(){
|
|
|
-
|
|
|
-// $score = Db::name('user')->where('id', 'not in', 7493267)->sum('score');
|
|
|
-// $this->assign('score', $score);
|
|
|
-//
|
|
|
-// $chizi = Db::name('coupon_plan')->where('state', 1)->sum('target_num');
|
|
|
-// $this->assign('chizi', $chizi);
|
|
|
-
|
|
|
- $total = Db::name('user')->whereDay('reg_time', 'yesterday')->count('id');
|
|
|
-// $total_shim = Db::name('user')->whereDay('reg_time', 'yesterday')->where('is_auth', 1)->count('id');
|
|
|
$res = [
|
|
|
- 'date'=>sr_getcurtime(time()-86400, 'Y年-m月-d日'),
|
|
|
-// 'tz_sum'=>Db::name('user')->sum('tz_num'),
|
|
|
-// 'xz_more_10'=>Db::name('user')->where('xz_num', '>', 11.5)->where('user_type', 'not in', '4')->sum('xz_num'),
|
|
|
- 'yesterday_income'=>Db::name('payment')->where('order_type', 4)->where('pay_way', 'not in', '3')->where('state', 6)->whereDay('creat_at', 'yesterday')->sum('total_fee'),
|
|
|
- 'yesterday_incomey'=>Db::name('payment')->where('order_type', 4)->where('pay_way', 'in', '3')->where('state', 6)->whereDay('creat_at', 'yesterday')->sum('total_fee'),
|
|
|
- 'yesterday_unusdt'=>Db::name('payment')->where('order_type', 5)->where('pay_way', 'not in', '19')->where('state', 6)->whereDay('creat_at', 'yesterday')->sum('total_fee'),
|
|
|
- 'yesterday_usdt'=>Db::name('payment')->where('order_type', 5)->where('pay_way', 'in', '19')->where('state', 6)->whereDay('creat_at', 'yesterday')->sum('total_fee'),
|
|
|
-
|
|
|
- 'withdow_success'=>number_format(Db::name('withdraw_log')->whereDay('update_at', 'yesterday')->where('status', 1)->sum('practical_money'), '2', '.', ''),
|
|
|
- 'withdow_apply_today'=>number_format(Db::name('withdraw_log')->whereDay('create_at', 'today')->where('status', 0)->sum('practical_money'), '2', '.', ''),
|
|
|
- 'yesterday_incomeuser'=>$total,
|
|
|
-// 'yester_incomshiming'=>$total_shim,
|
|
|
-// 'yester_couponnum'=>Db::name('coupon_plan_log')->whereDay('create_time', 'yesterday')->count('id'),
|
|
|
-// 'yeseter_xznum'=>Db::name('xz_log')->where('type', 6)->whereDay('create_at', 'yesterday')->sum('score'),
|
|
|
-// 'yester_shouxu'=>Db::name('xz_log')->where('type', 5)->whereDay('create_at', 'yesterday')->sum('shouxu_num'),
|
|
|
- 'total_score'=>Db::name('user')->where('id', 'not in', [5344210,5344229])->sum('score'),
|
|
|
- 'total_money'=>Db::name('user')->where('id', 'not in', [5344210,5344229])->sum('money'),
|
|
|
- 'today_income'=>Db::name('payment')->where('order_type', 4)->where('pay_way', 'not in', '3')->where('state', 6)->whereDay('creat_at', 'today')->sum('total_fee'),
|
|
|
- 'today_incomey'=>Db::name('payment')->where('order_type', 4)->where('pay_way', 'in', '3')->where('state', 6)->whereDay('creat_at', 'today')->sum('total_fee'),
|
|
|
- 'today_unusdt'=>Db::name('payment')->where('order_type', 5)->where('pay_way', 'not in', '19')->where('state', 6)->whereDay('creat_at', 'today')->sum('total_fee'),
|
|
|
- 'today_usdt'=>Db::name('payment')->where('order_type', 5)->where('pay_way', 'in', '19')->where('state', 6)->whereDay('creat_at', 'today')->sum('total_fee'),
|
|
|
+ // 昨日数据
|
|
|
+ 'yesterday'=>sr_getcurtime(time()-86400, 'Y年-m月-d日'),
|
|
|
+ 'yesterday_register'=>Db::name('user')->whereDay('reg_time', 'yesterday')->count('id'),
|
|
|
+ 'yesterday_recharge'=>Db::name('payment')->whereIn('order_type', [4,5])->where('state', 6)->whereDay('creat_at', 'yesterday')->sum('total_fee'),
|
|
|
+ 'yesterday_withdraw'=>Db::name('withdraw_log')->where('status', 1)->whereDay('creat_at', 'yesterday')->sum('practical_money'),
|
|
|
+
|
|
|
+ // 今日数据
|
|
|
+ 'today'=>sr_getcurtime(time(), 'Y年-m月-d日'),
|
|
|
+ 'today_register'=>Db::name('user')->whereDay('reg_time', 'today')->count('id'),
|
|
|
+ 'today_recharge'=>Db::name('payment')->whereIn('order_type', [4,5])->where('state', 6)->whereDay('creat_at', 'today')->sum('total_fee'),
|
|
|
+ 'today_withdraw'=>Db::name('withdraw_log')->where('status', 1)->whereDay('creat_at', 'today')->sum('practical_money'),
|
|
|
|
|
|
];
|
|
|
|
|
|
$this->assign('res', $res);
|
|
|
-
|
|
|
-// $today_income
|
|
|
- $today_income = Db::name('payment')->where('order_type', 4)->where('state', 6)->whereDay('creat_at', 'today')->sum('total_fee');
|
|
|
- $this->assign('today_income', $today_income);
|
|
|
-
|
|
|
- $chongzhi = Db::name('payment')->where('state', 6)->where('order_type', 4)->sum('total_fee');
|
|
|
-// $yuechongzhi = Db::name('payment')->where('state', 6)->where('order_type', 5)->sum('total_fee');
|
|
|
- $total_income = $chongzhi ;
|
|
|
-
|
|
|
-
|
|
|
- $this->assign('total_income', number_format($total_income, '2', '.', ''));
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|