Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
area363 committed Jul 10, 2024
1 parent 9a7725e commit 6b8fa2f
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions NineChronicles.DataProvider/Store/MySql/AdventureBossStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public partial class MySqlStore
{
public async partial Task StoreAdventureBossSeasonList(List<AdventureBossSeasonModel> seasonList)
{
Log.Debug($"[Adventure Boss] StoreAdventureBossSeason: {seasonList.Count}");
Console.WriteLine($"[Adventure Boss] StoreAdventureBossSeason: {seasonList.Count}");
NineChroniclesContext? ctx = null;
try
{
Expand All @@ -26,12 +26,12 @@ public async partial Task StoreAdventureBossSeasonList(List<AdventureBossSeasonM
var existSeason = await ctx.AdventureBossSeason.FirstOrDefaultAsync(s => s.Season == season.Season);
if (existSeason is null)
{
Log.Debug("[Adventure Boss] Season not exist.");
Console.WriteLine("[Adventure Boss] Season not exist.");
await ctx.AdventureBossSeason.AddAsync(season);
}
else
{
Log.Debug("[Adventure Boss] Season Exist: update");
Console.WriteLine("[Adventure Boss] Season Exist: update");
existSeason.RaffleReward = season.RaffleReward;
existSeason.RaffleWinnerAddress = season.RaffleWinnerAddress;
ctx.AdventureBossSeason.Update(existSeason);
Expand All @@ -42,7 +42,7 @@ public async partial Task StoreAdventureBossSeasonList(List<AdventureBossSeasonM
}
catch (Exception e)
{
Log.Debug(e.Message);
Console.WriteLine(e.Message);
}
finally
{
Expand All @@ -55,7 +55,7 @@ public async partial Task StoreAdventureBossSeasonList(List<AdventureBossSeasonM

public async partial Task StoreAdventureBossWantedList(List<AdventureBossWantedModel> wantedList)
{
Log.Debug($"[Adventure Boss] StoreAdventureBossWantedList: {wantedList.Count}");
Console.WriteLine($"[Adventure Boss] StoreAdventureBossWantedList: {wantedList.Count}");
NineChroniclesContext? ctx = null;
try
{
Expand All @@ -69,13 +69,13 @@ public async partial Task StoreAdventureBossWantedList(List<AdventureBossWantedM
}
}

Log.Debug("[Adventure Boss] Wanted Added");
Console.WriteLine("[Adventure Boss] Wanted Added");
await ctx.SaveChangesAsync();
Log.Debug("[Adventure Boss] Wanted Saved");
Console.WriteLine("[Adventure Boss] Wanted Saved");
}
catch (Exception e)
{
Log.Debug(e.Message);
Console.WriteLine(e.Message);
}
finally
{
Expand All @@ -88,7 +88,7 @@ public async partial Task StoreAdventureBossWantedList(List<AdventureBossWantedM

public async partial Task StoreAdventureBossChallengeList(List<AdventureBossChallengeModel> challengeList)
{
Log.Debug($"[Adventure Boss] StoreAdventureBossChallenge: {challengeList.Count}");
Console.WriteLine($"[Adventure Boss] StoreAdventureBossChallenge: {challengeList.Count}");
NineChroniclesContext? ctx = null;
try
{
Expand All @@ -102,13 +102,13 @@ public async partial Task StoreAdventureBossChallengeList(List<AdventureBossChal
}
}

Log.Debug($"[Adventure Boss] Challenge Added");
Console.WriteLine("[Adventure Boss] Challenge Added");
await ctx.SaveChangesAsync();
Log.Debug("[Adventure Boss] Challenge Saved");
Console.WriteLine("[Adventure Boss] Challenge Saved");
}
catch (Exception e)
{
Log.Debug(e.Message);
Console.WriteLine(e.Message);
}
finally
{
Expand All @@ -121,7 +121,7 @@ public async partial Task StoreAdventureBossChallengeList(List<AdventureBossChal

public async partial Task StoreAdventureBossRushList(List<AdventureBossRushModel> rushList)
{
Log.Debug($"[Adventure Boss] StoreAdventureBossRush: {rushList.Count}");
Console.WriteLine($"[Adventure Boss] StoreAdventureBossRush: {rushList.Count}");
NineChroniclesContext? ctx = null;
try
{
Expand All @@ -135,12 +135,13 @@ public async partial Task StoreAdventureBossRushList(List<AdventureBossRushModel
}
}

Console.WriteLine("[Adventure Boss] Rush Added");
await ctx.SaveChangesAsync();
Log.Debug("[Adventure Boss] Rush Saved");
Console.WriteLine("[Adventure Boss] Rush Saved");
}
catch (Exception e)
{
Log.Debug(e.Message);
Console.WriteLine(e.Message);
}
finally
{
Expand All @@ -153,7 +154,7 @@ public async partial Task StoreAdventureBossRushList(List<AdventureBossRushModel

public async partial Task StoreAdventureBossUnlockFloorList(List<AdventureBossUnlockFloorModel> unlockFloorList)
{
Log.Debug($"[Adventure Boss] StoreAdventureBossUnlockFloor: {unlockFloorList.Count}");
Console.WriteLine($"[Adventure Boss] StoreAdventureBossUnlockFloor: {unlockFloorList.Count}");
NineChroniclesContext? ctx = null;

try
Expand All @@ -168,12 +169,13 @@ public async partial Task StoreAdventureBossUnlockFloorList(List<AdventureBossUn
}
}

Console.WriteLine("[Adventure Boss] UnlockFloor Added");
await ctx.SaveChangesAsync();
Log.Debug("[Adventure Boss] UnlockFloor Saved");
Console.WriteLine("[Adventure Boss] UnlockFloor Saved");
}
catch (Exception e)
{
Log.Debug(e.Message);
Console.WriteLine(e.Message);
}
finally
{
Expand All @@ -186,7 +188,7 @@ public async partial Task StoreAdventureBossUnlockFloorList(List<AdventureBossUn

public async partial Task StoreAdventureBossClaimRewardList(List<AdventureBossClaimRewardModel> claimList)
{
Log.Debug($"[Adventure Boss] StoreAdventureBossClaimReward: {claimList.Count}");
Console.WriteLine($"[Adventure Boss] StoreAdventureBossClaimReward: {claimList.Count}");
NineChroniclesContext? ctx = null;

try
Expand All @@ -201,12 +203,13 @@ public async partial Task StoreAdventureBossClaimRewardList(List<AdventureBossCl
}
}

Console.WriteLine("[Adventure Boss] Claim Added");
await ctx.SaveChangesAsync();
Log.Debug("[Adventure Boss] Claim Saved");
Console.WriteLine("[Adventure Boss] Claim Saved");
}
catch (Exception e)
{
Log.Debug(e.Message);
Console.WriteLine(e.Message);
}
finally
{
Expand Down

0 comments on commit 6b8fa2f

Please sign in to comment.