From 77987729b5fb162988003ec86025e85db984dbdb Mon Sep 17 00:00:00 2001 From: zpc Date: Sat, 7 Feb 2026 19:12:01 +0800 Subject: [PATCH] 21 --- .../HoneyBox/src/HoneyBox.Core/Services/InvitationService.cs | 5 ++++- .../HoneyBox/src/HoneyBox.Model/Entities/UserPosterCache.cs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/HoneyBox/src/HoneyBox.Core/Services/InvitationService.cs b/server/HoneyBox/src/HoneyBox.Core/Services/InvitationService.cs index a8675253..c11c4ac2 100644 --- a/server/HoneyBox/src/HoneyBox.Core/Services/InvitationService.cs +++ b/server/HoneyBox/src/HoneyBox.Core/Services/InvitationService.cs @@ -80,16 +80,19 @@ public class InvitationService : IInvitationService // 生成用户专属海报 var shareImage = string.Empty; + _logger.LogInformation("开始为用户 {UserId} 生成海报,平台: {Platform}", userId, platform); var posterResult = await _posterService.GetUserPosterAsync(userId, platform); if (posterResult.Success && !string.IsNullOrEmpty(posterResult.ImageUrl)) { shareImage = posterResult.ImageUrl; + _logger.LogInformation("用户 {UserId} 海报生成成功: {Url}", userId, shareImage); } else { // 如果海报生成失败,使用静态分享图片作为备选 shareImage = await GetShareImageAsync(); - _logger.LogWarning("用户 {UserId} 海报生成失败: {Message},使用静态分享图片", userId, posterResult.Message); + _logger.LogWarning("用户 {UserId} 海报生成失败: {Message},平台: {Platform},使用静态分享图片: {FallbackImage}", + userId, posterResult.Message, platform, shareImage); } return new InvitationInfoResponse diff --git a/server/HoneyBox/src/HoneyBox.Model/Entities/UserPosterCache.cs b/server/HoneyBox/src/HoneyBox.Model/Entities/UserPosterCache.cs index 2ea817d1..75fc8031 100644 --- a/server/HoneyBox/src/HoneyBox.Model/Entities/UserPosterCache.cs +++ b/server/HoneyBox/src/HoneyBox.Model/Entities/UserPosterCache.cs @@ -84,3 +84,4 @@ public class UserPosterCache [Column("updated_at")] public DateTime UpdatedAt { get; set; } = DateTime.Now; } + \ No newline at end of file