|
|
@@ -161,7 +161,7 @@ class MotionService extends BaseService
|
|
|
$sql = sprintf($sql, ...$binds);
|
|
|
|
|
|
$ranks = $this->model::from(\DB::raw("({$sql}) as a"))
|
|
|
- ->where(['id'=> $userId])
|
|
|
+ ->where(['user_id'=> $userId])
|
|
|
->select([\DB::raw('count(id) as total'),'user_id','rank'])
|
|
|
->first();
|
|
|
if($ranks){
|