mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
revert exam index seedbouns
This commit is contained in:
@@ -57,7 +57,7 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$r = floatval(25.32);
|
||||
$r = User::query()->first()->seed_points;
|
||||
dd($r);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ class Exam extends NexusModel
|
||||
self::INDEX_UPLOADED => ['name' => 'Uploaded', 'unit' => 'GB', 'source_user_field' => 'uploaded'],
|
||||
self::INDEX_SEED_TIME_AVERAGE => ['name' => 'Seed time average', 'unit' => 'Hour', 'source_user_field' => 'seedtime'],
|
||||
self::INDEX_DOWNLOADED => ['name' => 'Downloaded', 'unit' => 'GB', 'source_user_field' => 'downloaded'],
|
||||
self::INDEX_SEED_BONUS => ['name' => 'Seed points', 'unit' => '', 'source_user_field' => 'seed_points'],
|
||||
self::INDEX_SEED_BONUS => ['name' => 'Bonus', 'unit' => '', 'source_user_field' => 'seedbonus'],
|
||||
];
|
||||
|
||||
const FILTER_USER_CLASS = 'classes';
|
||||
|
||||
@@ -92,6 +92,11 @@ class User extends Authenticatable
|
||||
return self::DONATE_YES;
|
||||
}
|
||||
|
||||
public function getSeedPointsAttribute(): string
|
||||
{
|
||||
return $this->seed_points ?? 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 为数组 / JSON 序列化准备日期。
|
||||
|
||||
@@ -605,7 +605,6 @@ class ExamRepository extends BaseRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated old version used
|
||||
* @param ExamUser $examUser
|
||||
* @param false $allSum
|
||||
* @return array|null
|
||||
|
||||
@@ -84,7 +84,10 @@ class TorrentRepository extends BaseRepository
|
||||
$query->orderBy($sortField, $sortType);
|
||||
|
||||
$with = ['user'];
|
||||
$torrents = $query->with($with)->paginate();
|
||||
$torrents = $query->with($with)
|
||||
->orderBy('pos_state', 'desc')
|
||||
->orderBy('id', 'desc')
|
||||
->paginate();
|
||||
return $torrents;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user