using Furion.DynamicApiController;
using Microsoft.AspNetCore.Mvc;
using Nirvana.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Waste.Application.ThirdApiInfo
{
///
/// 开放数据
///
[ApiDescriptionSettings("DevApi")]
[NonUnify]
public class OpenAppService : IDynamicApiController
{
private readonly IOpenService _openService;
public OpenAppService(IOpenService openService)
{
_openService = openService;
}
///
/// 获取设备上报相关信息
///
///
///
[HttpPost]
public async Task GetDevInfoAsync(GetDevInfoRequestDto data)
{
return await _openService.GetDevInfoAsync(data);
}
///
/// 心跳数据上报
///
///
///
[HttpPost]
public async Task PostHeartAsync(DevHeartRequestDto data)
{
return await _openService.PostHeartAsync(data);
}
///
/// 获取设备注册信息,第一次开机使用
///
///
///
[HttpGet]
[QueryParameters]
public async Task RegInfoAsync(string ecode)
{
return await _openService.RegInfoAsync(ecode);
}
}
}