diff --git a/src/Oms.Application/Services/Channels/ServiceChannelService.Helpers.cs b/src/Oms.Application/Services/Channels/ServiceChannelService.Helpers.cs index e3c2f22..825dde4 100644 --- a/src/Oms.Application/Services/Channels/ServiceChannelService.Helpers.cs +++ b/src/Oms.Application/Services/Channels/ServiceChannelService.Helpers.cs @@ -337,7 +337,11 @@ public partial class ServiceChannelService ? await BuildPricePublishSnapshotAsync(serviceChannelId) : await BuildRulesPublishSnapshotAsync(serviceChannelId); - // Content 中保存完整快照,回滚时直接从快照恢复。 + var content = operatorType == PriceOperatorType + ? OmsDocHelper.CanonicalizeChannelPriceSnapshotJson(snapshot) + : OmsDocHelper.SerializeSnapshotJson(snapshot); + + // Content 存 canonical 形态,与 sync-status 对比口径一致。 await ServiceChannelRepository.InsertPublishRecordAsync(new ServiceChannelPublishRecord { ServiceChannelId = serviceChannelId, @@ -347,7 +351,7 @@ public partial class ServiceChannelService PublishUser = string.IsNullOrWhiteSpace(CurrentUser.UserName) ? CurrentUser.GetId().ToString() : CurrentUser.UserName!, PublishTime = DateTime.Now, Description = description, - Content = OmsDocHelper.SerializeSnapshotJson(snapshot) + Content = content }); }