Exemplo n.º 1
0
 /// <summary>
 /// 写日志
 /// </summary>
 /// <param name="logEntity">对象</param>
 public async Task <int> WriteLog(LogEntity logEntity)
 {
     logEntity.id               = Guid.NewGuid().ToString();
     logEntity.operate_time     = DateTime.Now;
     logEntity.is_delete        = false;
     logEntity.ip_address       = NetHelper.Ip;
     logEntity.ip_address_city  = IpLocationHelper.GetIpLocation(NetHelper.Ip);
     logEntity.browser          = NetHelper.Browser;
     logEntity.operating_system = NetHelper.GetOSVersion();
     return(await _service.BaseInsert(logEntity));
 }