feat(mypage): /mypage/index reflects persisted bg selection

Wires MyPageController.Index to read Viewer.MyPageBgId/SelectType/BgRotation
instead of emitting an empty MyPageBgSetting placeholder; adds Include for
MyPageBgRotation in ViewerRepository.GetViewerByShortUdid; adds fresh-viewer
zero-defaults test and write→read round-trip test (9/9 controller tests pass).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-09 16:53:34 -04:00
parent 6123a64b37
commit 483cc1c1e0
3 changed files with 58 additions and 2 deletions

View File

@@ -112,9 +112,17 @@ public class MyPageController : SVSimController
Quest = new Quest(), // TODO(mypage-stub): active Quest event + viewer flags
MasterPointRankingPeriod = BuildMasterPointRankingPeriod(masterPointPeriod),
PreReleaseStatus = 0, // TODO(mypage-stub): derive from PreReleaseInfo
UserMyPageInfo = new UserMyPageInfo // TODO(mypage-stub): viewer mypage BG selection
UserMyPageInfo = new UserMyPageInfo
{
UserMyPageSetting = new MyPageBgSetting(),
UserMyPageSetting = new MyPageBgSetting
{
MyPageId = viewer.MyPageBgId.ToString(),
SelectType = viewer.MyPageBgSelectType.ToString(),
MyPageIdList = viewer.MyPageBgRotation
.OrderBy(r => r.Slot)
.Select(r => r.BgId.ToString())
.ToList(),
},
},
BasicPuzzle = new Models.Dtos.Common.BadgeFlag { IsDisplayBadge = false }, // TODO(mypage-stub): viewer practice-puzzle progress
IsBattlePassPeriod = rotation.IsBattlePassPeriod,