diff --git a/application/api/model/Room.php b/application/api/model/Room.php index 638c7883..17075bdc 100644 --- a/application/api/model/Room.php +++ b/application/api/model/Room.php @@ -561,7 +561,7 @@ class Room extends Model }else{ $total_earning = db::name('user_earnings_log') ->where(['user_id' => $userId,'room_id' => $room_id,'change_type' => 19]) - ->where('createtime', 'between', [strtotime($stime), $end_time]) + ->where(['createtime' => ['between', [strtotime($stime), $end_time]]]) ->sum('earnings'); } return ['code' => 1, 'msg' => '成功', 'data' => ['total_amount' => $total_amount, 'total_earning' => $total_earning,'list' => $list_data_array]];