jy-plc/Controllers/DeviceUsedController.cs

35 lines
922 B
C#
Raw Normal View History

2024-07-24 13:30:21 +00:00
using LangGuan.Command.Model.EntityModel;
using LangGuan.Services;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LangGuan.Controllers
{
[ApiVersion("1.0")]
[Route("api/[controller]/v{version:apiVersion}")]
[ApiController]
public class DeviceUsedController : ControllerBase
{
private DeviceUsedService _deviceUsedService;
public DeviceUsedController(DeviceUsedService deviceUsedService)
{
_deviceUsedService = deviceUsedService;
}
/// <summary>
/// 测试数据
/// </summary>
/// <returns></returns>
[HttpPost]
public async Task<IActionResult> Test(DeviceUsed input)
{
await _deviceUsedService.AddDeviceUsed(input);
return Ok();
}
}
}