fix: 买价发布落库也走 canonical JSON,与同步态对比一致
All checks were successful
Build and Deploy / deploy (push) Successful in 58s
All checks were successful
Build and Deploy / deploy (push) Successful in 58s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
73f334edc8
commit
c2ac20df04
@ -337,7 +337,11 @@ public partial class ServiceChannelService
|
|||||||
? await BuildPricePublishSnapshotAsync(serviceChannelId)
|
? await BuildPricePublishSnapshotAsync(serviceChannelId)
|
||||||
: await BuildRulesPublishSnapshotAsync(serviceChannelId);
|
: await BuildRulesPublishSnapshotAsync(serviceChannelId);
|
||||||
|
|
||||||
// Content 中保存完整快照,回滚时直接从快照恢复。
|
var content = operatorType == PriceOperatorType
|
||||||
|
? OmsDocHelper.CanonicalizeChannelPriceSnapshotJson(snapshot)
|
||||||
|
: OmsDocHelper.SerializeSnapshotJson(snapshot);
|
||||||
|
|
||||||
|
// Content 存 canonical 形态,与 sync-status 对比口径一致。
|
||||||
await ServiceChannelRepository.InsertPublishRecordAsync(new ServiceChannelPublishRecord
|
await ServiceChannelRepository.InsertPublishRecordAsync(new ServiceChannelPublishRecord
|
||||||
{
|
{
|
||||||
ServiceChannelId = serviceChannelId,
|
ServiceChannelId = serviceChannelId,
|
||||||
@ -347,7 +351,7 @@ public partial class ServiceChannelService
|
|||||||
PublishUser = string.IsNullOrWhiteSpace(CurrentUser.UserName) ? CurrentUser.GetId<int>().ToString() : CurrentUser.UserName!,
|
PublishUser = string.IsNullOrWhiteSpace(CurrentUser.UserName) ? CurrentUser.GetId<int>().ToString() : CurrentUser.UserName!,
|
||||||
PublishTime = DateTime.Now,
|
PublishTime = DateTime.Now,
|
||||||
Description = description,
|
Description = description,
|
||||||
Content = OmsDocHelper.SerializeSnapshotJson(snapshot)
|
Content = content
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user