Пример #1
0
        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));
        }
Пример #2
0
        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);
        }
Пример #3
0
 public void CreateAppLog(AppLogCreatedEvent appLogCreatedEvent)
 {
     _bus.Publish(appLogCreatedEvent);
 }