diff --git a/Expedience.Api/Consumers/DutyCompletionResultConsumer.cs b/Expedience.Api/Consumers/DutyCompletionResultConsumer.cs index 04d1fb9..fe829e5 100644 --- a/Expedience.Api/Consumers/DutyCompletionResultConsumer.cs +++ b/Expedience.Api/Consumers/DutyCompletionResultConsumer.cs @@ -43,7 +43,8 @@ namespace Expedience.Api.Consumers var completionResult = new DutyCompletionResult { Id = message.UploadId, - DutyId = message.DutyInfo.DutyId, + TerritoryId = message.DutyInfo.TerritoryId, + ContentId = message.DutyInfo.ContentId, UserId = user.UserId, HasEcho = message.DutyInfo.HasEcho, IsUnrestricted = message.DutyInfo.IsUnrestricted, @@ -59,6 +60,7 @@ namespace Expedience.Api.Consumers PluginVersion = message.ClientInfo.PluginVersion, Lang = message.ClientInfo.GameLanguage, DataCenter = message.DataCenter, + UploadedAt = message.UploadDateUtc, }; dbContext.DutyCompletionResults.Add(completionResult); diff --git a/Expedience.Api/Controllers/ExpedienceController.cs b/Expedience.Api/Controllers/ExpedienceController.cs index 2806d78..5c918b7 100644 --- a/Expedience.Api/Controllers/ExpedienceController.cs +++ b/Expedience.Api/Controllers/ExpedienceController.cs @@ -96,7 +96,7 @@ namespace Expedience.Api.Controllers } catch (Exception ex) { - _logger.LogError(ex, "Error obtaining user name for World Id {worldId} and hash {userHash}: {errorMessage}", ex.Message); + _logger.LogError(ex, "Error obtaining user name for World Id {worldId} and hash {userHash}: {errorMessage}", worldId, userHash, ex.Message); } finally { @@ -107,6 +107,8 @@ namespace Expedience.Api.Controllers { _logger.LogError("Could not acquire lock for {lockKey}", lockKey); } + + return StatusCode(500); } } } diff --git a/Expedience.Infrastructure/Models/Duty.cs b/Expedience.Infrastructure/Models/Duty.cs index 378be68..6ae3396 100644 --- a/Expedience.Infrastructure/Models/Duty.cs +++ b/Expedience.Infrastructure/Models/Duty.cs @@ -9,7 +9,7 @@ namespace Expedience.Infrastructure.Models public class Duty { public int Id { get; set; } - public string DutyName { get; set; } + public string ContentName { get; set; } public string DutyType { get; set; } } diff --git a/Expedience.Infrastructure/Models/DutyCompletionResult.cs b/Expedience.Infrastructure/Models/DutyCompletionResult.cs index 35280b3..70ebee2 100644 --- a/Expedience.Infrastructure/Models/DutyCompletionResult.cs +++ b/Expedience.Infrastructure/Models/DutyCompletionResult.cs @@ -4,7 +4,8 @@ { public Guid Id { get; set; } public int UserId { get; set; } - public int DutyId { get; set; } + public int TerritoryId { get; set; } + public int ContentId { get; set; } public bool HasEcho { get; set; } public bool IsUnrestricted { get; set; } public bool IsMinILevel { get; set; } @@ -20,6 +21,7 @@ public string Lang { get; set; } public List DutyMembers { get; set; } public string DataCenter { get; set; } - + public DateTime UploadedAt { get; set; } + } } diff --git a/Expedience.Models/CurrentDutyInfo.cs b/Expedience.Models/CurrentDutyInfo.cs index 80cea42..cc79381 100644 --- a/Expedience.Models/CurrentDutyInfo.cs +++ b/Expedience.Models/CurrentDutyInfo.cs @@ -13,8 +13,9 @@ namespace Expedience.Models private Stopwatch _stopwatch; public PlayerInfo Player { get; set; } - public int DutyId { get; set; } - public string DutyName { get; set; } + public int TerritoryId { get; set; } + public int ContentId { get; set; } + public string ContentName { get; set; } public List PartyMembers { get; set; } = new(); public DateTime StartTime { get; } public DateTime EndTime { get; private set; } diff --git a/Expedience.Models/DutyCompletionResult.cs b/Expedience.Models/DutyCompletionResult.cs index 5e7f088..1430024 100644 --- a/Expedience.Models/DutyCompletionResult.cs +++ b/Expedience.Models/DutyCompletionResult.cs @@ -15,8 +15,9 @@ namespace Expedience.Models { DutyInfo = new DutyInfo { - DutyId = currentDuty.DutyId, - DutyName = currentDuty.DutyName, + TerritoryId = currentDuty.TerritoryId, + ContentName = currentDuty.ContentName, + ContentId = currentDuty.ContentId, IsUnrestricted = currentDuty.IsUnrestricted, IsMinILevel = currentDuty.IsMinILevel, IsNpcSupported = currentDuty.PartyMembers.Any(p => p.IsNpc), diff --git a/Expedience.Models/DutyInfo.cs b/Expedience.Models/DutyInfo.cs index 331d5de..e3ac585 100644 --- a/Expedience.Models/DutyInfo.cs +++ b/Expedience.Models/DutyInfo.cs @@ -8,8 +8,9 @@ namespace Expedience.Models { public class DutyInfo { - public int DutyId { get; set; } - public string DutyName { get; set; } + public int TerritoryId { get; set; } + public int ContentId { get; internal set; } + public string ContentName { get; set; } public bool IsUnrestricted { get; set; } public bool HasEcho { get; set; } public bool IsNpcSupported { get; set; }