集計一覧
-id | -max | -updated_at | -
---|
id | +title | +難易度 | +max | +updated_at | +|||
---|---|---|---|---|---|---|---|
{{$value->id}} | -{{$value->max}} | -{{$value->updated_at}} | +id | +title | +難易度 | +max | +updated_at |
diff --git a/OngekiScoreLog/app/Http/Controllers/AdminController.php b/OngekiScoreLog/app/Http/Controllers/AdminController.php
index c9b095a..8012529 100644
--- a/OngekiScoreLog/app/Http/Controllers/AdminController.php
+++ b/OngekiScoreLog/app/Http/Controllers/AdminController.php
@@ -71,7 +71,20 @@ public function GetConfig(){
public function GetAggregate(){
$result = \App\AggregateOverdamage::all();
- return view('admin/aggregate', compact(['result']));
+ $difficultyToStr = [
+ 0 => 'Basic',
+ 1 => 'Advanced',
+ 2 => 'Expert',
+ 3 => 'Master',
+ 10 => 'Lunatic',
+ ];
+
+ $musics = [];
+ $temp = \App\MusicData::all();
+ foreach ($temp as $value) {
+ $musics[$value->id] = $value->title;
+ }
+ return view('admin/aggregate', compact(['result', 'musics', 'difficultyToStr']));
}
/**
diff --git a/OngekiScoreLog/app/Http/Controllers/ViewUserController.php b/OngekiScoreLog/app/Http/Controllers/ViewUserController.php
index e50ae4f..107d36e 100644
--- a/OngekiScoreLog/app/Http/Controllers/ViewUserController.php
+++ b/OngekiScoreLog/app/Http/Controllers/ViewUserController.php
@@ -340,7 +340,12 @@ public function getUserPage(Request $request, $id, $mode = null){
return view('user', compact('id', 'status', 'score', 'stat', 'mode', 'submenuActive', 'sidemark', 'archive'));
}
- public function getOverDamegePage($id){
+ public function getOverDamegePage($id, $difficulty = ""){
+ // 存在しないdifficultyが指定された場合はリダイレクト
+ if(!in_array($difficulty, ["", "basic", "advanced", "expert", "master", "lunatic"])){
+ return redirect("/user/" . $id . "/overdamage");
+ }
+
$userStatus = new UserStatus();
$user = User::where('id' ,$id)->first();
$status = $userStatus->getRecentUserData($id);
@@ -380,30 +385,24 @@ public function getOverDamegePage($id){
// 自分のスコアを取得
$score = (new ScoreData)->getRecentUserScore($id)->addMusicData()->exclusionDeletedMusic()->getValue();
- // 難易度を通常難易度1つ+LUNATICだけに絞る
- // FIXME: こんなのコード側でやっちゃいけない... けどテーブル設計的にどうしようもなく...
- $temp = [];
+ // 難易度を指定のものに絞る
$scoreDatas = [];
{
foreach ($score as $value) {
$key = $value->song_id;
- if($value->difficulty === 10){
- if($value->over_damage_high_score !== "0.00"){
+ if($value->over_damage_high_score !== "0.00"){
+ if(($difficulty === "" && ($value->difficulty === 3 || $value->difficulty === 10))
+ || ($difficulty === "basic" && $value->difficulty === 0)
+ || ($difficulty === "advanced" && $value->difficulty === 1)
+ || ($difficulty === "expert" && $value->difficulty === 2)
+ || ($difficulty === "master" && $value->difficulty === 3)
+ || ($difficulty === "lunatic" && $value->difficulty === 10)
+ ){
$scoreDatas[] = $value;
}
- }else{
- $temp[$key][] = $value;
- }
- }
-
- foreach ($temp as $value) {
- array_multisort(array_column($value, 'over_damage_high_score'), SORT_DESC, $value);
- if($value[0]->over_damage_high_score !== "0.00"){
- $scoreDatas[] = $value[0];
}
}
}
-
- return view('user_overdamage', compact('id', 'status', 'lastUpdate', 'scoreDatas', 'topRankerScore'));
+ return view('user_overdamage', compact('id', 'difficulty', 'status', 'lastUpdate', 'scoreDatas', 'topRankerScore'));
}
}
diff --git a/OngekiScoreLog/resources/views/admin/aggregate.blade.php b/OngekiScoreLog/resources/views/admin/aggregate.blade.php
index 1de84e1..76151a6 100644
--- a/OngekiScoreLog/resources/views/admin/aggregate.blade.php
+++ b/OngekiScoreLog/resources/views/admin/aggregate.blade.php
@@ -8,26 +8,45 @@
@include('admin/_submenu', ['active' => 'aggregate'])
@endsection
+@section('additional_footer')
+
+@endsection
+
@section('content')
集計一覧
-
-
-
+
-
-
-
- @foreach ($result as $key => $value)
+ id
- max
- updated_at
-
+
+
+
+
+ @foreach ($result as $key => $value)
+
+
+
+
id
+ title
+ 難易度
+ max
+ updated_at
+
-
- @endforeach
-
- {{$value->id}}
- {{$value->max}}
- {{$value->updated_at}}
+ id
+ title
+ 難易度
+ max
+ updated_at
+
+ @endforeach
+
+ {{$value->id}}
+ {{$musics[$value->song_id]}}
+ {{substr($difficultyToStr[$value->difficulty], 0, 3)}}
+ {{$value->max}}
+ {{$value->updated_at}}
+
登録されている全ユーザーのオーバーダメージのうち、一番高いものと比較することが出来ます。
+ (※全国ランキング1位のスコアではありません!)
OD埋めなどにご活用ください。
プレイしている楽曲内で、一番ODが高い難易度のみ表示されます。全難易度のODが0の曲は表示されません。
- 最終更新: {{$lastUpdate->format('Y-m-d H:i:s')}} (?%表示は未集計です) +最終更新: {{$lastUpdate->format('Y-m-d H:i:s')}} (?%表示は未集計です)
+ +