|
@@ -224,8 +224,9 @@ class Userintro extends Api
|
|
|
}
|
|
|
//dump($downall_uid);
|
|
|
|
|
|
- //邀请奖励收益
|
|
|
- $recharge_sum = Db::name('user_agentjewel_log')->where('user_id','IN',$downall_uid)->where('log_type',51)->where('createtime','BETWEEN',[$starttime,$endtime])->sum('change_value');
|
|
|
+ //邀请奖励收益,其实是好友充值
|
|
|
+// $recharge_sum = Db::name('user_agentjewel_log')->where('user_id','IN',$downall_uid)->where('log_type',51)->where('createtime','BETWEEN',[$starttime,$endtime])->sum('change_value');
|
|
|
+ $recharge_sum = Db::name('user_god_log')->where('user_id','IN',$downall_uid)->where('log_type',41)->where('createtime','BETWEEN',[$starttime,$endtime])->sum('change_value');
|
|
|
$result['recharge_sum'] = $recharge_sum;
|
|
|
//视频收益
|
|
|
$video_sum = Db::name('user_match_video_log')->where('to_user_id','IN',$downall_uid)->where('updatetime','BETWEEN',[$starttime,$endtime])->sum('money');
|
|
@@ -246,7 +247,8 @@ class Userintro extends Api
|
|
|
$active_num = Db::name('user_active')->where('user_id','IN',$downall_uid)->where('requesttime','BETWEEN',[$starttime,$endtime])->count();
|
|
|
$result['active_num'] = $active_num;
|
|
|
//收益用户
|
|
|
- $a = Db::name('user_agentjewel_log')->where('user_id','IN',$downall_uid)->where('log_type',51)->where('createtime','BETWEEN',[$starttime,$endtime])->distinct(true)->field('user_id')->select();
|
|
|
+// $a = Db::name('user_agentjewel_log')->where('user_id','IN',$downall_uid)->where('log_type',51)->where('createtime','BETWEEN',[$starttime,$endtime])->distinct(true)->field('user_id')->select();
|
|
|
+ $a = Db::name('user_god_log')->where('user_id','IN',$downall_uid)->where('log_type',41)->where('createtime','BETWEEN',[$starttime,$endtime])->distinct(true)->field('user_id')->select();
|
|
|
$a1 = array_column($a,'user_id');
|
|
|
|
|
|
$b = Db::name('user_match_video_log')->where('to_user_id','IN',$downall_uid)->where('updatetime','BETWEEN',[$starttime,$endtime])->distinct(true)->field('to_user_id')->select();
|
|
@@ -338,8 +340,9 @@ class Userintro extends Api
|
|
|
$user['avatar'] = one_domain_image($user['avatar']);
|
|
|
|
|
|
$user['agentname'] = Db::name('user')->where('id',$user['intro_uid'])->value('agentname');
|
|
|
- //邀请奖励收益
|
|
|
- $recharge_sum = Db::name('user_agentjewel_log')->where('user_id',$user['id'])->where('log_type',51)->sum('change_value');
|
|
|
+ //邀请奖励收益,其实是好友充值
|
|
|
+// $recharge_sum = Db::name('user_agentjewel_log')->where('user_id',$user['id'])->where('log_type',51)->sum('change_value');
|
|
|
+ $recharge_sum = Db::name('user_gold_log')->where('user_id',$user['id'])->where('log_type',41)->sum('change_value');
|
|
|
$user['recharge_sum'] = $recharge_sum;
|
|
|
//视频收益
|
|
|
$video_sum = Db::name('user_match_video_log')->where('to_user_id',$user['id'])->sum('money');
|
|
@@ -412,8 +415,9 @@ class Userintro extends Api
|
|
|
//dump($downall_uid);
|
|
|
foreach($downall_uid as $key => &$user){
|
|
|
$user['agentname'] = Db::name('user')->where('id',$user['intro_uid'])->value('agentname');
|
|
|
- //邀请奖励收益
|
|
|
- $recharge_sum = Db::name('user_agentjewel_log')->where('user_id',$user['id'])->where('log_type',51)->where('createtime','BETWEEN',[$starttime,$endtime])->sum('change_value');
|
|
|
+ //邀请奖励收益,其实是好友充值
|
|
|
+// $recharge_sum = Db::name('user_agentjewel_log')->where('user_id',$user['id'])->where('log_type',51)->where('createtime','BETWEEN',[$starttime,$endtime])->sum('change_value');
|
|
|
+ $recharge_sum = Db::name('user_gold_log')->where('user_id',$user['id'])->where('log_type',41)->where('createtime','BETWEEN',[$starttime,$endtime])->sum('change_value');
|
|
|
// $user['recharge_sum'] = $recharge_sum;
|
|
|
//视频收益
|
|
|
$video_sum = Db::name('user_match_video_log')->where('to_user_id',$user['id'])->where('updatetime','BETWEEN',[$starttime,$endtime])->sum('money');
|
|
@@ -451,8 +455,9 @@ class Userintro extends Api
|
|
|
|
|
|
$user_info = Db::name('user')->where('id',$user_id)->field('id,username,avatar,nickname,intro_uid,yaoqingtime')->find();
|
|
|
|
|
|
- //邀请奖励收益
|
|
|
- $recharge_sum = Db::name('user_agentjewel_log')->where('user_id',$user_id)->where('log_type',51)->sum('change_value');
|
|
|
+ //邀请奖励收益,其实是好友充值
|
|
|
+// $recharge_sum = Db::name('user_agentjewel_log')->where('user_id',$user_id)->where('log_type',51)->sum('change_value');
|
|
|
+ $recharge_sum = Db::name('user_gold_log')->where('user_id',$user_id)->where('log_type',41)->sum('change_value');
|
|
|
$user_info['recharge_sum'] = $recharge_sum;
|
|
|
//视频收益
|
|
|
$video_sum = Db::name('user_match_video_log')->where('to_user_id',$user_id)->sum('money');
|
|
@@ -512,8 +517,9 @@ class Userintro extends Api
|
|
|
'date' => date('m-d',$starttime),
|
|
|
];
|
|
|
|
|
|
- //邀请奖励收益
|
|
|
- $recharge_sum = Db::name('user_agentjewel_log')->where('user_id',$user_id)->where('log_type',51)->where('createtime','BETWEEN',[$starttime,$endtime])->sum('change_value');
|
|
|
+ //邀请奖励收益,其实是好友充值
|
|
|
+// $recharge_sum = Db::name('user_agentjewel_log')->where('user_id',$user_id)->where('log_type',51)->where('createtime','BETWEEN',[$starttime,$endtime])->sum('change_value');
|
|
|
+ $recharge_sum = Db::name('user_gold_log')->where('user_id',$user_id)->where('log_type',41)->where('createtime','BETWEEN',[$starttime,$endtime])->sum('change_value');
|
|
|
$thisday['recharge_sum'] = $recharge_sum;
|
|
|
//视频收益
|
|
|
$video_sum = Db::name('user_match_video_log')->where('to_user_id',$user_id)->where('updatetime','BETWEEN',[$starttime,$endtime])->sum('money');
|