using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Data.Entity; using System.Data.Entity.Migrations; using System.Data.SqlClient; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web.Http; using DevExpress.XtraBars; using XdCxRhDW.App.Model; using XdCxRhDW.Dto; using XdCxRhDW.WebApi; namespace XdCxRhDW.App.Controllers { /// /// 服务状态上报接口 /// public class SvrReportController : BaseController { /// /// 服务状态上报 /// /// 服务状态信息 /// [HttpPost] public AjaxResult Report(SvrStateReportDto dto) { try { if (!string.IsNullOrWhiteSpace(dto.BaseHttpAddr)) { if (dto.BaseHttpAddr.EndsWith("/")) dto.BaseHttpAddr = dto.BaseHttpAddr + "api/"; else dto.BaseHttpAddr = dto.BaseHttpAddr + "/api/"; } Messenger.Defalut.Pub("服务状态改变", dto); return Success(); } catch (Exception ex) { XdCxRhDW.Framework.LogHelper.Error("服务状态上报处理出错!", ex); return Error("服务状态上报处理出错"); } } } //public class ItemSvrEventArgs //{ // /// // /// 错误码 // /// // public int code { get; set; } // /// // /// 消息 // /// // public string msg { get; set; } // /// // /// 服务 // /// // public ModelSvr modelSvrs { get; set; } //} }