...
|
...
|
@@ -995,7 +995,7 @@ class CommonController extends RestBaseController |
|
|
}
|
|
|
})
|
|
|
->field('i.id,i.create_time,i.project_id,p.name project_name')
|
|
|
->group("DATE_FORMAT(FROM_UNIXTIME(i.create_time),'%Y-%m-%d')")
|
|
|
->group("i.project_id,DATE_FORMAT(FROM_UNIXTIME(i.create_time),'%Y-%m-%d')")
|
|
|
->order('i.id desc')
|
|
|
->select()
|
|
|
->toArray();
|
...
|
...
|
@@ -1028,7 +1028,7 @@ class CommonController extends RestBaseController |
|
|
$query->where('i.create_time', '<=', $endTime);
|
|
|
}
|
|
|
})
|
|
|
->group("DATE_FORMAT(FROM_UNIXTIME(i.create_time),'%Y-%m-%d')")
|
|
|
->group("i.project_id,DATE_FORMAT(FROM_UNIXTIME(i.create_time),'%Y-%m-%d')")
|
|
|
->count();
|
|
|
$limit = config('site.limit');
|
|
|
return ceil($count/$limit);
|
...
|
...
|
@@ -2212,4 +2212,18 @@ class CommonController extends RestBaseController |
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
//查询要推送的人员
|
|
|
public function getPushUsers($user_ids){
|
|
|
$res = Db::name('user')
|
|
|
->whereIn('id',$user_ids)
|
|
|
->field('id,registration_id')
|
|
|
->select()
|
|
|
->toArray();
|
|
|
//取出字段
|
|
|
$registrations = array_column($res,'registration_id');
|
|
|
//过滤空值,下标从零开始
|
|
|
$registrations = array_values(array_filter($registrations));
|
|
|
return $registrations;
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|