|
|
@@ -74,12 +74,10 @@ class BackflowService extends BaseService
|
|
|
{
|
|
|
$date = Carbon::now('Asia/Shanghai')->format('Y-m');
|
|
|
$limit = isset($search['limit']) ? $search['limit'] : 15;
|
|
|
- $query = self::$MODEL::where(self::getWhere($search))
|
|
|
+ $query = self::$MODEL::where(self::getWhere($search));
|
|
|
|
|
|
// ->where('date', '<', $date)
|
|
|
- ->with(['member'])
|
|
|
- ->orderByDesc('date')
|
|
|
- ->orderBy('status');
|
|
|
+
|
|
|
|
|
|
|
|
|
if (isset($search['username']) && !empty($search['username'])) {
|
|
|
@@ -88,6 +86,12 @@ class BackflowService extends BaseService
|
|
|
$query1->where('username', $username);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ $query->with(['member'])
|
|
|
+ ->orderByDesc('date')
|
|
|
+ ->orderBy('status');
|
|
|
+
|
|
|
$paginator = $query->paginate($limit);
|
|
|
return ['total' => $paginator->total(), 'data' => $paginator->items()];
|
|
|
}
|