参考资料
Task<MessageModel<BlogViewModels>>
[HttpGet]
[Route("DetailNuxtNoPer")]
public async Task<MessageModel<BlogViewModels>> DetailNuxtNoPer(int id)
{
_logger.LogInformation("xxxxxxxxxxxxxxxxxxx");
return Success(await _blogArticleServices.GetBlogDetails(id));
}
[NonAction]
public MessageModel<T> Success<T>(T data, string msg = "成功")
{
return new MessageModel<T>()
{
success = true,
msg = msg,
response = data,
};
}
Task<IActionResult>
/// <summary>
/// 网关数据变化上报
/// </summary>
/// <param name="notifyData"></param>
/// <returns></returns>
[HttpPost]
[CustomRoute(sericeName, serviceVersion, "gatewaydata")]
public async Task<IActionResult> GatewayData(SubDeviceDataPropertyInfo notifyData)
{
var result = await Panda.Framework.IOCDI.Container.Resolve<Panda.Factory.IGatSubscribe.IHwyV5PSubscribe>($"{sericeName.ToLower()}.cloud.hwyv5p").GatewayData(notifyData, productCategory, sericeName, serviceVersion);
return Ok(result);
}