|
|
@@ -153,7 +153,7 @@ class MotionService extends BaseService
|
|
|
if($total>0){
|
|
|
$model = $this->model::from(\DB::raw(env('DB_PREFIX').'motions as m,(select (@rank:=0)) as rank'))
|
|
|
->where(['mark'=> 1,'status'=> 1])
|
|
|
- ->groupBy(\DB::raw('count(id)'))
|
|
|
+ ->groupBy('user_id')
|
|
|
->orderBy('create_time', 'asc')
|
|
|
->select([\DB::raw('count(id) as total'),'days','id',\DB::raw('(@rank:=@rank+1) as rank')]);
|
|
|
$binds = $model->getBindings();
|