25 lines
625 B
C#
25 lines
625 B
C#
using Dlhis.Entity.Common.Entities;
|
|
using Dlhis.Entity.Common.Enums;
|
|
using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
|
|
|
namespace Dlhis.Basic.Common.ApiLog.Services.Implements;
|
|
|
|
public class OperateLogService : IOperateLog
|
|
{
|
|
private readonly IDbContext _dbContext;
|
|
|
|
public OperateLogService(IDbContext dbContext)
|
|
{
|
|
_dbContext = dbContext.ChangeDb("log");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public async Task LogAsync(OperateLogType type, string content)
|
|
{
|
|
await _dbContext.InsertAsync(new OperateLogEntity
|
|
{
|
|
Type = type,
|
|
Content = content
|
|
});
|
|
}
|
|
} |