fix 离线下载数据问题处理

This commit is contained in:
2024-08-07 22:10:43 +08:00
parent 0a7b551fe0
commit aff935f15c
2 changed files with 11 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ public class MiddleService : IMiddleService
{
entity.Id = 0;
entity.Amount = -Math.Abs(entity.Amount);
entity.Remark = "离线消费提交";
if (!await _dbContext.Queryable<BalanceRecordEntity>().AnyAsync(x => x.No == entity.No))
{
await _dbContext.InsertAsync(entity);

View File

@@ -113,6 +113,16 @@ public class DataDownloadService : IDataDownloadService
await DownloadAsync<LocalGainfoEntity>(factory);
await DownloadAsync<LocalGainfoMealEntity>(factory);
await DownloadAsync<LocalDeviceEntity>(factory);
await DownloadAsync<LocalDeviceRegistryEntity>(factory);
await DownloadAsync<LocalBusinessPlaceEntity>(factory);
await DownloadAsync<LocalBusinessShiftEntity>(factory);
await DownloadAsync<LocalBusinessPlaceShiftRelationshipEntity>(factory);
await DownloadAsync<LocalBusinessShiftMealRelationshipEntity>(factory);
await _dbContext.Client.Ado.CommitTranAsync();
}
catch (Exception)