|
@@ -485,6 +485,7 @@ class FinanceRepository extends BaseRepository
|
|
485
|
$sWeekWhere = " 1=1";
|
485
|
$sWeekWhere = " 1=1";
|
|
486
|
$weekWhere = " 1=1";
|
486
|
$weekWhere = " 1=1";
|
|
487
|
$dayWhere = " 1=1";
|
487
|
$dayWhere = " 1=1";
|
|
|
|
488
|
+ $userDayWhere = " 1=1";
|
|
488
|
|
489
|
|
|
489
|
// 获取当前 ISO 年份和周数
|
490
|
// 获取当前 ISO 年份和周数
|
|
490
|
$year = $today->format('o'); // ISO-8601 年份
|
491
|
$year = $today->format('o'); // ISO-8601 年份
|
|
@@ -508,12 +509,14 @@ class FinanceRepository extends BaseRepository
|
|
508
|
$weekWhere .= " and DATE(take_time) >= '" . $thisMonday->format('Y-m-d') . "' and DATE(take_time) < '" . $nextMonday->format('Y-m-d') . "'";
|
509
|
$weekWhere .= " and DATE(take_time) >= '" . $thisMonday->format('Y-m-d') . "' and DATE(take_time) < '" . $nextMonday->format('Y-m-d') . "'";
|
|
509
|
//今日时间条件
|
510
|
//今日时间条件
|
|
510
|
$dayWhere .= " and DATE(take_time) = '" . $todayFormatted . "'";
|
511
|
$dayWhere .= " and DATE(take_time) = '" . $todayFormatted . "'";
|
|
|
|
512
|
+ // 今日新增会员条件
|
|
|
|
513
|
+ $userDayWhere .= " and DATE(create_time) >= '" . $todayFormatted . "'";
|
|
511
|
|
514
|
|
|
512
|
// 测试账号
|
515
|
// 测试账号
|
|
513
|
$testUids = Db::name('user')->where('test_user', '1')->column('uid');
|
516
|
$testUids = Db::name('user')->where('test_user', '1')->column('uid');
|
|
514
|
|
517
|
|
|
515
|
$sharedUserCount = Db::name('shared_prosperity_user')->count(); //共富会员总人数
|
518
|
$sharedUserCount = Db::name('shared_prosperity_user')->count(); //共富会员总人数
|
|
516
|
- $sharedUserDayCount = Db::name('shared_prosperity_user')->where($dayWhere)->count(); //共富今日新增会员
|
|
|
|
|
|
519
|
+ $sharedUserDayCount = Db::name('shared_prosperity_user')->where($userDayWhere)->count(); //共富今日新增会员
|
|
517
|
$sharedUserPvCount = Db::name('shared_prosperity_reward_record')
|
520
|
$sharedUserPvCount = Db::name('shared_prosperity_reward_record')
|
|
518
|
->where(['type' => SharedProsperityRewardRecordEnum::TYPE['PV']['code'], 'status' => SharedProsperityRewardRecordEnum::STATUS['VALID']['code'], 'pm' => SharedProsperityRewardRecordEnum::PM['INCOME']['code']])
|
521
|
->where(['type' => SharedProsperityRewardRecordEnum::TYPE['PV']['code'], 'status' => SharedProsperityRewardRecordEnum::STATUS['VALID']['code'], 'pm' => SharedProsperityRewardRecordEnum::PM['INCOME']['code']])
|
|
519
|
->whereNotIn('user_id',$testUids)
|
522
|
->whereNotIn('user_id',$testUids)
|