private void AddLog(List <MessageRecord> sendMsgs, FGSMSResponse response) { SystemLog sLog = new SystemLog(); sLog.ActionName = "SendSMS"; sLog.ControllerName = "MessageRecordService.Send"; sLog.ResultLog = JsonUtils.Serialize(response); sLog.Source = LogSource.Admin; sLog.Type = response.success ? LogType.Info : LogType.Error; sLog.UserAgent = string.Join(",", sendMsgs.Select(g => g.MessageId)); sLog.UserId = sendMsgs.First().OperatorId; sLog.ReqParameter = sendMsgs.Serialize(); _interProvider.AddLog(sLog); }
public bool AddLog(SystemLog logInfo) { //参数验证 if (logInfo == null) { ErrorMsg = ErrorCode.ParameterNull; return(false); } return(_integratedProvider.AddLog(logInfo)); }