public Tuple <bool, T> PublishAppLog <T>(AppLogCreatedEvent appLog) { Dictionary <string, object> paramDic = appLog.ToDictionary(); var action = "PublishAppLog"; return(DoPost <T>(SNAKE_WEBAPI_TRACKLOG_CONTROLLER, action, paramDic)); }
public TransData <string> PublishAppLog([FromBody] AppLogCreatedEvent appLogCreatedEvent) { var result = new TransData <string>(); if (appLogCreatedEvent == null) { return(Response <string>(null, "Parameter is null", (int)ServiceResultCode.ParameterError)); } try { var trackLogService = GetService <LogService>(); trackLogService.CreateAppLog(appLogCreatedEvent); result.Code = (int)ServiceResultCode.Succeeded; } catch (Exception e) { result.Data = null; result.Message = "服务异常!"; result.Code = (int)ServiceResultCode.UndefinedError; } return(result); }
public void CreateAppLog(AppLogCreatedEvent appLogCreatedEvent) { _bus.Publish(appLogCreatedEvent); }