12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- 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 Serilog;
- using XdCxRhDW.App.Model;
- using XdCxRhDW.Dto;
- using XdCxRhDW.WebApi;
- namespace XdCxRhDW.App.Controllers
- {
- /// <summary>
- /// 服务状态上报接口
- /// </summary>
- public class SvrReportController : BaseController
- {
- /// <summary>
- /// 服务状态上报
- /// </summary>
- /// <param name="dto">服务状态信息</param>
- /// <returns></returns>
- [HttpPost]
- public AjaxResult Report(SvrStateReportDto dto)
- {
- try
- {
- Messenger.Defalut.Pub("服务状态改变", dto);
- return Success();
- }
- catch (Exception ex)
- {
- Serilog.Log.Error(ex, "服务状态上报处理出错!");
- return Error("服务状态上报处理出错");
- }
- }
- }
- //public class ItemSvrEventArgs
- //{
- // /// <summary>
- // /// 错误码
- // /// </summary>
- // public int code { get; set; }
- // /// <summary>
- // /// 消息
- // /// </summary>
- // public string msg { get; set; }
- // /// <summary>
- // /// 服务
- // /// </summary>
- // public ModelSvr modelSvrs { get; set; }
- //}
- }
|