fix 优化apilog和设备上传log
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
using Dlhis.Entity.Basic.Enums;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Dlhis.Basic.Device.Request
|
||||
{
|
||||
public class ApiLogRequest :PageDto
|
||||
{
|
||||
public string message { get; set; }
|
||||
namespace Dlhis.Basic.Device.Request;
|
||||
|
||||
[EnumDataType(typeof(ApiLogEnumType)),]
|
||||
public ApiLogEnumType? Type { get; set; }
|
||||
}
|
||||
public class ApiLogRequest : PageDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 日志级别 LogLevel
|
||||
/// </summary>
|
||||
[EnumDataType(typeof(LogLevel))]
|
||||
public LogLevel? Level { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,42 +1,56 @@
|
||||
using SqlSugar;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Dlhis.Basic.Device.Response
|
||||
namespace Dlhis.Basic.Device.Response;
|
||||
|
||||
public class ApiLogResponse
|
||||
{
|
||||
public class ApiLogResponse
|
||||
/// <summary>
|
||||
/// 时间UTC
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public string Timestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产生时间
|
||||
/// </summary>
|
||||
public DateTime RaiseTime
|
||||
{
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
public string Timestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 级别
|
||||
/// </summary>
|
||||
public string Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板
|
||||
/// </summary>
|
||||
public string Template { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息内容
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 异常内容
|
||||
/// </summary>
|
||||
public string Exception { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 属性
|
||||
/// </summary>
|
||||
public string Properties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
public DateTime _ts { get; set; }
|
||||
get
|
||||
{
|
||||
return DateTime.Parse(Timestamp).ToLocalTime();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 级别
|
||||
/// </summary>
|
||||
public string Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public string Template { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息内容
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 异常内容
|
||||
/// </summary>
|
||||
public string Exception { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 属性
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public string Properties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public DateTime _TS { get; set; }
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ using Kurisu.SqlSugar.Services;
|
||||
using Mapster;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.Basic.Device.Services.Implements;
|
||||
|
||||
@@ -247,10 +248,10 @@ public class DeviceService : IDeviceService
|
||||
var offlineNumber = await GetOfflineDevicesCount(devices);
|
||||
|
||||
var res = new DeviceNumberResponse
|
||||
{
|
||||
{
|
||||
OfflineNumber = offlineNumber.Count,
|
||||
TotalNumber = devices.Count,
|
||||
OnlineNumber = devices.Count- offlineNumber.Count
|
||||
OnlineNumber = devices.Count - offlineNumber.Count
|
||||
};
|
||||
return res;
|
||||
}
|
||||
@@ -270,14 +271,14 @@ public class DeviceService : IDeviceService
|
||||
foreach (var device in devices)
|
||||
{
|
||||
var regis = deviceRegistrys.FirstOrDefault(x => x.DeviceUniqueNo == device.UniqueNo);
|
||||
if (regis == null)
|
||||
if (regis == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
TimeSpan timeDifference = DateTime.Now - regis.LastHeartbeatTime;
|
||||
if (timeDifference.TotalSeconds > (device.HeartbeatInterval * 3))
|
||||
{
|
||||
list.Add(device);
|
||||
list.Add(device);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
@@ -307,7 +308,7 @@ public class DeviceService : IDeviceService
|
||||
.ToListAsync();
|
||||
|
||||
//离线
|
||||
var offDevices =await GetOfflineDevicesCount(devices);
|
||||
var offDevices = await GetOfflineDevicesCount(devices);
|
||||
var offids = offDevices.Select(x => x.Id).ToList();
|
||||
|
||||
if (request.IsOnAndOff)
|
||||
@@ -372,28 +373,19 @@ public class DeviceService : IDeviceService
|
||||
};
|
||||
list.Add(res);
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public async Task<Pagination<ApiLogResponse>> GetLogsAsync(ApiLogRequest request)
|
||||
{
|
||||
var level = request.Type.ToString();
|
||||
return await Scoped.Request.Value.CreateAsync(async (sp) =>
|
||||
{
|
||||
var configuration = sp.GetService<IConfiguration>();
|
||||
var logConnectionString = configuration.GetSection("SqlSugarOptions:LogConnectionString").Value;
|
||||
|
||||
//todo 切换连接字符串
|
||||
var dbContext = sp.GetService<IDbContext>();
|
||||
dbContext.Client.CurrentConnectionConfig.ConnectionString = logConnectionString;
|
||||
var logs = await dbContext.Queryable<ApiLogEntity>()
|
||||
.WhereIF(!request.message.IsEmpty(), x => x.Message.Contains(request.message))
|
||||
.WhereIF(!level.IsEmpty(), x => x.Level == level)
|
||||
var logs = await _dbContext.ChangeDb("log").Queryable<ApiLogEntity>()
|
||||
.WhereIF(request.Search.IsPresent(), x => x.Message.Contains(request.Search))
|
||||
.WhereIF(request.Level.HasValue, x => x.Level == request.Level)
|
||||
.Select<ApiLogResponse>()
|
||||
.ToPageListAsync(request);
|
||||
return logs;
|
||||
|
||||
});
|
||||
return logs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Kurisu.AspNetCore;
|
||||
using Dlhis.Entity.Basic.Entity;
|
||||
using Kurisu.AspNetCore;
|
||||
using Kurisu.AspNetCore.Startup;
|
||||
using Kurisu.Core.DataAccess.Entity;
|
||||
using Kurisu.SqlSugar.Extensions;
|
||||
@@ -14,26 +15,58 @@ public class SqlSugarPack : BaseAppPack
|
||||
|
||||
public override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddSqlSugar();
|
||||
services.AddSqlSugar(sp =>
|
||||
{
|
||||
var configuration = sp.GetService<IConfiguration>();
|
||||
|
||||
return new List<ConnectionConfig>
|
||||
{
|
||||
new ConnectionConfig
|
||||
{
|
||||
ConfigId = "face",
|
||||
|
||||
ConnectionString = configuration.GetSection("SqlSugarOptions:FaceConnectionString").Value,
|
||||
DbType = DbType.MySql,
|
||||
InitKeyType = InitKeyType.Attribute,
|
||||
IsAutoCloseConnection = true,
|
||||
|
||||
MoreSettings = new ConnMoreSettings
|
||||
{
|
||||
DisableNvarchar = true,
|
||||
}
|
||||
},
|
||||
new ConnectionConfig
|
||||
{
|
||||
ConfigId = "log",
|
||||
|
||||
ConnectionString = configuration.GetSection("SqlSugarOptions:LogConnectionString").Value,
|
||||
DbType = DbType.MySql,
|
||||
InitKeyType = InitKeyType.Attribute,
|
||||
IsAutoCloseConnection = true,
|
||||
|
||||
MoreSettings = new ConnMoreSettings
|
||||
{
|
||||
DisableNvarchar = true,
|
||||
}
|
||||
},
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
public override void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
using var scope = app.ApplicationServices.CreateScope();
|
||||
var db = scope.ServiceProvider.GetService<ISqlSugarClient>();
|
||||
var db = scope.ServiceProvider.GetService<IDbContext>();
|
||||
var tables = App.ActiveTyps.Where(x => x.IsDefined(typeof(SugarTable), false))
|
||||
.Where(x => !x.IsDefined(typeof(SkipScanAttribute), false))
|
||||
.ToArray();
|
||||
|
||||
db.DbMaintenance.CreateDatabase();
|
||||
db.CodeFirst.InitTables(tables);
|
||||
db.Client.DbMaintenance.CreateDatabase();
|
||||
db.Client.CodeFirst.InitTables(tables);
|
||||
|
||||
//using var scopeFace = app.ApplicationServices.CreateScope();
|
||||
//var dbFace = scopeFace.ServiceProvider.GetService<ISqlSugarClient>();
|
||||
//var faceConnectionString = Configuration.GetSection("SqlSugarOptions:FaceConnectionString").Value;
|
||||
//dbFace.CurrentConnectionConfig.ConnectionString = faceConnectionString;
|
||||
//dbFace.DbMaintenance.CreateDatabase();
|
||||
//dbFace.CodeFirst.InitTables<GainfoFaceEntity>();
|
||||
var faceDb = db.ChangeDb("face");
|
||||
faceDb.DbMaintenance.CreateDatabase();
|
||||
faceDb.CodeFirst.InitTables<GainfoFaceEntity>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ public class EnumsController : ControllerBase
|
||||
})
|
||||
.ToList();
|
||||
|
||||
//todo cache 速度
|
||||
var dbTypes = _dbContext.Queryable<BasicTypeEntity>().OrderBy(x => x.Sequence).ToList();
|
||||
var dbResult = dbTypes.GroupBy(x => x.Type).Select(g =>
|
||||
{
|
||||
@@ -77,6 +76,29 @@ public class EnumsController : ControllerBase
|
||||
|
||||
result.AddRange(dbResult);
|
||||
|
||||
result.Add(GetCurrentEnums("LogLevel", "日志级别", typeof(LogLevel)));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static CommonEnumResponse GetCurrentEnums(string code, string name, Type enumType)
|
||||
{
|
||||
return new CommonEnumResponse
|
||||
{
|
||||
Code = code,
|
||||
Name = name,
|
||||
Data = enumType.GetFields(BindingFlags.Public | BindingFlags.Static).Select(item =>
|
||||
{
|
||||
var e = (Enum)Enum.Parse(item.FieldType, item.GetValue(null).ToString());
|
||||
var fd = e.GetDescription();
|
||||
return new KeyValueDto
|
||||
{
|
||||
Key = fd,
|
||||
Value = (int)item.GetValue(null)
|
||||
};
|
||||
})
|
||||
.ToList()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,61 +1,55 @@
|
||||
using Kurisu.Core.DataAccess.Entity;
|
||||
using Kurisu.SqlSugar;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar.DbConvert;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Entity
|
||||
namespace Dlhis.Entity.Basic.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// api日志表
|
||||
/// </summary>
|
||||
[SugarTable(TableName = "Logs", TableDescription = "api日志表")]
|
||||
public class ApiLogEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// api日志表
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[SugarTable(TableName = "Logs", TableDescription = "api日志表")]
|
||||
public class ApiLogEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "时间")]
|
||||
public string Timestamp { get; set; }
|
||||
[SugarColumn(ColumnDescription = "时间")]
|
||||
public string Timestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 级别
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "级别")]
|
||||
public string Level { get; set; }
|
||||
/// <summary>
|
||||
/// 级别
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "级别", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public LogLevel Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "模板")]
|
||||
public string Template { get; set; }
|
||||
/// <summary>
|
||||
/// 模板
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "模板")]
|
||||
public string Template { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息内容
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "消息内容")]
|
||||
public string Message { get; set; }
|
||||
/// <summary>
|
||||
/// 消息内容
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "消息内容")]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 异常内容
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "异常内容")]
|
||||
public string Exception { get; set; }
|
||||
/// <summary>
|
||||
/// 异常内容
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "异常内容")]
|
||||
public string Exception { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 属性
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "属性")]
|
||||
public string Properties { get; set; }
|
||||
/// <summary>
|
||||
/// 属性
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "属性")]
|
||||
public string Properties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "时间")]
|
||||
public DateTime _ts { get; set; }
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "时间")]
|
||||
public DateTime _ts { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,6 @@ public class GainfoFaceEntity : SugarBaseEntity
|
||||
/// <summary>
|
||||
/// 人脸
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "text", IsNullable = false)]
|
||||
[SugarColumn(ColumnDataType = "longtext", IsNullable = false)]
|
||||
public string Face { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Dlhis.Entity.Basic.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// api日志状态
|
||||
/// </summary>
|
||||
[Description("api日志状态")]
|
||||
public enum ApiLogEnumType
|
||||
{
|
||||
Information = 1,
|
||||
|
||||
Warning = 2,
|
||||
|
||||
Error = 3,
|
||||
|
||||
Fatal = 4,
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Kurisu.SqlSugar" Version="0.0.7" />
|
||||
<PackageReference Include="Kurisu.SqlSugar" Version="0.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -34,18 +34,6 @@ public class DeviceUploadLogsController : ControllerBase
|
||||
return await _deviceUploadLogService.GetPageAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传记录
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("record")]
|
||||
[IgnoreTenant]
|
||||
public async Task UploadLogAsync(DeviceUploadLogUploadRequest request)
|
||||
{
|
||||
await _deviceUploadLogService.UploadLogAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量上传记录
|
||||
/// </summary>
|
||||
@@ -57,5 +45,4 @@ public class DeviceUploadLogsController : ControllerBase
|
||||
{
|
||||
await _deviceUploadLogService.UploadLogsAsync(requests);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Dlhis.ScheduledTask.DeviceUploadLog.Response;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Dlhis.ScheduledTask.DeviceUploadLog.Response;
|
||||
|
||||
public class DeviceUploadLogResponse
|
||||
{
|
||||
@@ -29,4 +31,7 @@ public class DeviceUploadLogResponse
|
||||
/// 上传时间
|
||||
/// </summary>
|
||||
public DateTime RaiseDateTime { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string OriginUserUniqueNo { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Dlhis.Entity.Basic.Entity;
|
||||
using Dlhis.ScheduledTask.DeviceUploadLog.Request;
|
||||
using Dlhis.ScheduledTask.DeviceUploadLog.Request;
|
||||
using Dlhis.ScheduledTask.DeviceUploadLog.Response;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
|
||||
@@ -9,8 +8,6 @@ public interface IDeviceUploadLogService : IScopeDependency
|
||||
{
|
||||
Task<Pagination<DeviceUploadLogResponse>> GetPageAsync(DeviceUploadLogPageRequest request);
|
||||
|
||||
Task UploadLogAsync(DeviceUploadLogUploadRequest request);
|
||||
|
||||
Task UploadLogsAsync(List<DeviceUploadLogUploadRequest> requests);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using System.Configuration;
|
||||
using System.Linq.Expressions;
|
||||
using System.Linq.Expressions;
|
||||
using Dlhis.Entity.Basic.Entity;
|
||||
using Dlhis.Entity.Device.Entities;
|
||||
using Dlhis.ScheduledTask.DeviceUploadLog.Request;
|
||||
using Dlhis.ScheduledTask.DeviceUploadLog.Response;
|
||||
using Kurisu.AspNetCore.Scope;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Kurisu.SqlSugar.Attributes;
|
||||
using Kurisu.SqlSugar.Extensions;
|
||||
using Kurisu.SqlSugar.Services;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NetTaste;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Dlhis.ScheduledTask.DeviceUploadLog.Services.Implements;
|
||||
@@ -29,40 +23,34 @@ public class DeviceUploadLogService : IDeviceUploadLogService
|
||||
public async Task<Pagination<DeviceUploadLogResponse>> GetPageAsync(DeviceUploadLogPageRequest request)
|
||||
{
|
||||
var page = await _dbContext.Queryable<DeviceUploadLogEntity>()
|
||||
.LeftJoin<GainfoEntity>((deviceUp, ga) => deviceUp.UserUniqueNo == ga.No)
|
||||
.WhereIF(request.SearchDateTimePeriod?.Start.HasValue == true, deviceUp => deviceUp.RaiseDateTime >= request.SearchDateTimePeriod.Start)
|
||||
.WhereIF(request.SearchDateTimePeriod?.End.HasValue == true, deviceUp => deviceUp.RaiseDateTime <= request.SearchDateTimePeriod.End)
|
||||
.Select((deviceUp, ga) => new DeviceUploadLogResponse
|
||||
.Select((deviceUp) => new DeviceUploadLogResponse
|
||||
{
|
||||
OriginUserUniqueNo = deviceUp.UserUniqueNo,
|
||||
DeviceUniqueNo = deviceUp.DeviceUniqueNo,
|
||||
Id = deviceUp.Id,
|
||||
RaiseDateTime = deviceUp.RaiseDateTime,
|
||||
UserNo = ga.No,
|
||||
UserCode = ga.Code,
|
||||
UserName = ga.Name,
|
||||
//UserNo = ga.No,
|
||||
//UserCode = ga.Code,
|
||||
//UserName = ga.Name,
|
||||
})
|
||||
.ToPageListAsync(request);
|
||||
|
||||
var gainfos = await _dbContext.Queryable<GainfoEntity>().ToListAsync();
|
||||
page.Data.ForEach(item =>
|
||||
{
|
||||
_ = int.TryParse(item.OriginUserUniqueNo, out var userId);
|
||||
|
||||
var gainfo = gainfos.FirstOrDefault(x => x.No == item.OriginUserUniqueNo || x.Id == userId || x.Code == item.OriginUserUniqueNo);
|
||||
item.UserNo = gainfo?.No;
|
||||
item.UserCode = gainfo?.Code;
|
||||
item.UserName = gainfo?.Name;
|
||||
});
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
public async Task UploadLogAsync(DeviceUploadLogUploadRequest request)
|
||||
{
|
||||
var device = await _dbContext.Queryable<DeviceEntity>().Where(x => x.UniqueNo == request.DeviceUniqueNo).SingleAsync();
|
||||
device.ThrowIfNull("设备信息不存在");
|
||||
|
||||
var entity = new DeviceUploadLogEntity
|
||||
{
|
||||
DeviceUniqueNo = request.DeviceUniqueNo,
|
||||
// UploadTime = request.UploadTime,
|
||||
UserUniqueNo = request.UserUniqueNo,
|
||||
TenantId = device.TenantId,
|
||||
};
|
||||
|
||||
await _dbContext.InsertAsync(entity);
|
||||
}
|
||||
|
||||
|
||||
public async Task UploadLogsAsync(List<DeviceUploadLogUploadRequest> requests)
|
||||
{
|
||||
//判断存在的记录
|
||||
@@ -105,5 +93,5 @@ public class DeviceUploadLogService : IDeviceUploadLogService
|
||||
|
||||
await _dbContext.InsertAsync(records);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user