|
@@ -693,18 +693,24 @@ public class SnapshotOrderApplication : IOrderSnapshotApplication, IScopeDepende
|
|
|
{
|
|
|
if (_systemSettingCacheManager.Snapshot == false) return;
|
|
|
|
|
|
- var sspSourceChannel = new List<string>() { "ZGSSP", "SJP12345"};
|
|
|
+ var sspSourceChannel = new List<string>() { "ZGSSP", "SJP12345" };
|
|
|
if (sspSourceChannel.Any(m => m == dto.SourceChannelCode) == false)
|
|
|
{
|
|
|
- await _orderSnapshotRepository.Removeable()
|
|
|
+ await _orderSnapshotRepository.Updateable()
|
|
|
+ .SetColumns(m => m.IsDeleted, true)
|
|
|
.Where(m => m.Id == dto.Id)
|
|
|
.ExecuteCommandAsync(token);
|
|
|
- return;
|
|
|
}
|
|
|
- await _orderSnapshotRepository.Updateable()
|
|
|
- .SetColumns(m => m.IndustryId, dto.IndustryId)
|
|
|
- .SetColumns(m => m.IndustryName, dto.IndustryName)
|
|
|
- .Where(m => m.Id == dto.Id)
|
|
|
- .ExecuteCommandAsync(token);
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var snapshot = await _orderSnapshotRepository.Queryable(includeDeleted: true)
|
|
|
+ .Where(m => m.Id == dto.Id)
|
|
|
+ .FirstAsync(token);
|
|
|
+ snapshot.IsDeleted = false;
|
|
|
+ snapshot.IndustryId = dto.IndustryId;
|
|
|
+ snapshot.IndustryName = dto.IndustryName;
|
|
|
+
|
|
|
+ await _orderSnapshotRepository.UpdateAsync(snapshot, token);
|
|
|
+ }
|
|
|
}
|
|
|
}
|