Remove auto sort of shop folder
This commit is contained in:
parent
e8924d762b
commit
4b299b5259
@ -46,7 +46,6 @@ public class GetDanOdaiController : BaseController<GetDanOdaiController>
|
||||
Logger.LogWarning("Requested dan id {Id} does not exist!", danId);
|
||||
continue;
|
||||
}
|
||||
Logger.LogInformation(odaiData.Stringify());
|
||||
|
||||
response.AryOdaiDatas.Add(odaiData);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ public class GetShopFolderController : BaseController<GetShopFolderController>
|
||||
|
||||
gameDataService.GetTokenDataDictionary().TryGetValue("shopTokenId", out var shopTokenId);
|
||||
|
||||
var shopFolderDictionary = gameDataService.GetShopFolderDictionary();
|
||||
var shopFolderList = gameDataService.GetShopFolderList();
|
||||
|
||||
var response = new GetShopFolderResponse
|
||||
{
|
||||
@ -28,7 +28,7 @@ public class GetShopFolderController : BaseController<GetShopFolderController>
|
||||
VerupNo = 2
|
||||
};
|
||||
|
||||
foreach (var shopFolder in shopFolderDictionary) response.AryShopFolderDatas.Add(shopFolder.Value);
|
||||
response.AryShopFolderDatas.AddRange(shopFolderList);
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
|
@ -22,14 +22,18 @@ public class PlayResultController : BaseController<PlayResultController>
|
||||
|
||||
private readonly IAiDatumService aiDatumService;
|
||||
|
||||
private readonly IGameDataService gameDataService;
|
||||
|
||||
public PlayResultController(IUserDatumService userDatumService, ISongPlayDatumService songPlayDatumService,
|
||||
ISongBestDatumService songBestDatumService, IDanScoreDatumService danScoreDatumService, IAiDatumService aiDatumService)
|
||||
ISongBestDatumService songBestDatumService, IDanScoreDatumService danScoreDatumService, IAiDatumService aiDatumService,
|
||||
IGameDataService gameDataService)
|
||||
{
|
||||
this.userDatumService = userDatumService;
|
||||
this.songPlayDatumService = songPlayDatumService;
|
||||
this.songBestDatumService = songBestDatumService;
|
||||
this.danScoreDatumService = danScoreDatumService;
|
||||
this.aiDatumService = aiDatumService;
|
||||
this.gameDataService = gameDataService;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@ -74,6 +78,7 @@ public class PlayResultController : BaseController<PlayResultController>
|
||||
}
|
||||
|
||||
var bestData = await songBestDatumService.GetAllSongBestData(request.BaidConf);
|
||||
|
||||
for (var songNumber = 0; songNumber < playResultData.AryStageInfoes.Count; songNumber++)
|
||||
{
|
||||
var stageData = playResultData.AryStageInfoes[songNumber];
|
||||
|
@ -33,11 +33,10 @@ public class GameDataService : IGameDataService
|
||||
private ImmutableDictionary<uint, GetfolderResponse.EventfolderData> folderDictionary =
|
||||
ImmutableDictionary<uint, GetfolderResponse.EventfolderData>.Empty;
|
||||
|
||||
private ImmutableDictionary<uint, GetShopFolderResponse.ShopFolderData> shopFolderDictionary =
|
||||
ImmutableDictionary<uint, GetShopFolderResponse.ShopFolderData>.Empty;
|
||||
|
||||
private ImmutableDictionary<string, uint> qrCodeDataDictionary = ImmutableDictionary<string, uint>.Empty;
|
||||
|
||||
private List<GetShopFolderResponse.ShopFolderData> shopFolderList = new();
|
||||
|
||||
private List<uint> musics = new();
|
||||
|
||||
private List<uint> musicsWithUra = new();
|
||||
@ -98,9 +97,9 @@ public class GameDataService : IGameDataService
|
||||
return folderDictionary;
|
||||
}
|
||||
|
||||
public ImmutableDictionary<uint, GetShopFolderResponse.ShopFolderData> GetShopFolderDictionary()
|
||||
public List<GetShopFolderResponse.ShopFolderData> GetShopFolderList()
|
||||
{
|
||||
return shopFolderDictionary;
|
||||
return shopFolderList;
|
||||
}
|
||||
|
||||
public Dictionary<string, int> GetTokenDataDictionary()
|
||||
@ -270,7 +269,10 @@ public class GameDataService : IGameDataService
|
||||
private void InitializeShopFolderData(List<ShopFolderData>? shopFolderData)
|
||||
{
|
||||
shopFolderData.ThrowIfNull("Shouldn't happen!");
|
||||
shopFolderDictionary = shopFolderData.ToImmutableDictionary(data => data.SongNo, ToResponseShopFolderData);
|
||||
foreach (var folderData in shopFolderData)
|
||||
{
|
||||
shopFolderList.Add(ToResponseShopFolderData(folderData));
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeTokenData(Dictionary<string, int>? tokenData)
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Collections.Immutable;
|
||||
using SharedProject.Models;
|
||||
|
||||
namespace TaikoLocalServer.Services.Interfaces;
|
||||
|
||||
@ -24,7 +25,7 @@ public interface IGameDataService
|
||||
|
||||
public ImmutableDictionary<uint, GetfolderResponse.EventfolderData> GetFolderDictionary();
|
||||
|
||||
public ImmutableDictionary<uint, GetShopFolderResponse.ShopFolderData> GetShopFolderDictionary();
|
||||
public List<GetShopFolderResponse.ShopFolderData> GetShopFolderList();
|
||||
|
||||
public Dictionary<string, int> GetTokenDataDictionary();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user