WIN-2308041133\Administrator hace 8 meses
padre
commit
115c5e5873
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      application/api/controller/Platform.php

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

@@ -191,10 +191,10 @@ class Platform extends Api
                 if($user_list) {
                     foreach ($user_list as $key => $value) {
                         $user_income = $value['contribution'] * $each_income;  //该用户该短剧的收益
-                        $money = model('User')->where('uid',$value['uid'])->value('money');  //该用户当前余额
+                        $money = model('User')->where('id',$value['uid'])->value('money');  //该用户当前余额
                         $after = $money + $user_income;  //该用户分红后余额
                         MoneyLog::create(['user_id' => $value['uid'], 'money' =>$money  , 'before' => $money, 'after' => $after, 'memo' => $name.'每日收益分红']);
-                        $res = model('User')->where('uid', $value['uid'])->update(['money' => $after]);  //更新用户余额
+                        $res = model('User')->where('id', $value['uid'])->update(['money' => $after]);  //更新用户余额
                     }
                 }
             }
@@ -206,6 +206,7 @@ class Platform extends Api
              var_dump($e);
              Db::rollback();
          }
+        $this->success('分红完成');
     }
 
 }