WIN-2308041133\Administrator hace 6 meses
padre
commit
4bc0cba0c9
Se han modificado 1 ficheros con 4 adiciones y 3 borrados
  1. 4 3
      application/api/controller/Platform.php

+ 4 - 3
application/api/controller/Platform.php

@@ -189,14 +189,15 @@ class Platform extends Api
                 $income = model('video_platform_record')->where('vid', $v)->where('createtime', 'between', [$yesterdayStart, $yesterdayEnd])->sum('num');  //该短剧昨日收益
                 $each_income = $income / $count;  //每点贡献值的收益
                 $user_list = model('video_user')->where('vid', $v)->where('contribution','>',0)->select();
-                $name =model('Videolist')->where('id',$v)->find();  //该短剧名称
+                $name = model('Videolist')->where('id', $v)->value('name');  //该短剧名称
+                if (empty($name)){
+                    continue;
+                }
                 if($user_list) {
                     foreach ($user_list as $key => $value) {
                         $user_income = $value['contribution'] * $each_income;  //该用户该短剧的收益
                         $money = model('User')->where('id',$value['uid'])->value('money');  //该用户当前余额
                         $after = bcadd($money,$user_income,2);  //该用户分红后余额
-                        @file_put_contents("usdt.txt",  $v."-我id呢\r\n", 8);
-                        @file_put_contents("usdt.txt",  json_encode($name)."-我名字呢\r\n", 8);
                         MoneyLog::create(['user_id' => $value['uid'], 'money' =>$user_income  , 'before' => $money, 'after' => $after, 'memo' => $name.'每日收益分红']);
                         $res = model('User')->where('id', $value['uid'])->update(['money' => $after]);  //更新用户余额