|
|
@@ -45,6 +45,14 @@ class RebateService extends BaseService
|
|
|
$where[] = ['member_id', '=', $search['member_id']];
|
|
|
}
|
|
|
|
|
|
+ if (isset($search['first_name']) && !empty($search['first_name'])) {
|
|
|
+ $where[] = ['first_name', '=', $search['first_name']];
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isset($search['username']) && !empty($search['username'])) {
|
|
|
+ $where[] = ['username', '=', $search['username']];
|
|
|
+ }
|
|
|
+
|
|
|
if (isset($search['status']) && !empty($search['status'])) {
|
|
|
$where[] = ['status', '=', $search['status']];
|
|
|
}
|
|
|
@@ -89,7 +97,10 @@ class RebateService extends BaseService
|
|
|
|
|
|
$paginator = self::model()::where(self::getWhere($search))
|
|
|
->where('date', '<', $date)
|
|
|
- ->with('wallet:user_id,member_id,address,available_balance')->paginate($limit);
|
|
|
+ ->orderByDesc('date')
|
|
|
+ ->orderBy('status')
|
|
|
+ ->orderByDesc('betting_amount')
|
|
|
+ ->paginate($limit);
|
|
|
return ['total' => $paginator->total(), 'data' => $paginator->items()];
|
|
|
}
|
|
|
}
|