You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
883 B
C#
42 lines
883 B
C#
1 year ago
|
|
||
|
|
||
|
//----------SysOperLog开始----------
|
||
|
|
||
|
|
||
|
|
||
|
using System;
|
||
|
using System.Threading.Tasks;
|
||
|
using Admin.Core.IRepository;
|
||
|
using Admin.Core.IService.ISys;
|
||
|
using Admin.Core.Model.Sys;
|
||
|
|
||
|
namespace Admin.Core.Service.Sys
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 操作日志记录Service
|
||
|
/// </summary>
|
||
|
public partial class SysOperLogService : BaseServices<SysOperLog>, ISysOperLogService
|
||
|
{
|
||
|
IBaseRepository<SysOperLog> dal;
|
||
|
public SysOperLogService(IBaseRepository<SysOperLog> dal)
|
||
|
{
|
||
|
this.dal = dal;
|
||
|
BaseDal = dal;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 清空日志
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
public async Task<bool> Clear()
|
||
|
{
|
||
|
var sql = "truncate table [SysOperLog]";
|
||
|
return await dal.ExecSqlAsync(sql) >= 0;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//----------SysOperLog结束----------
|
||
|
|