2024-05-14 16:30:56 +08:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2024-06-24 09:05:26 +08:00
|
|
|
|
using WcsMain.ApiServe.ControllerFilter;
|
2024-06-20 09:41:02 +08:00
|
|
|
|
using WcsMain.ApiServe.ControllerFilter.ExceptionFilter;
|
2024-05-14 16:30:56 +08:00
|
|
|
|
using WcsMain.ApiServe.Controllers.Dto;
|
|
|
|
|
|
using WcsMain.ApiServe.Controllers.Dto.WcsDto.Socket;
|
|
|
|
|
|
using WcsMain.ApiServe.Service.WcsService;
|
|
|
|
|
|
using WcsMain.DataBase.TableEntity;
|
|
|
|
|
|
|
|
|
|
|
|
namespace WcsMain.ApiServe.Controllers.WcsController;
|
|
|
|
|
|
|
|
|
|
|
|
[Route("api/wcs/socket")]
|
|
|
|
|
|
[ApiController]
|
2024-06-20 09:41:02 +08:00
|
|
|
|
[WcsExceptionFilter]
|
2024-06-24 09:05:26 +08:00
|
|
|
|
[WcsAuthorization]
|
2024-05-14 16:30:56 +08:00
|
|
|
|
public class SocketController(SocketService socketService) : ControllerBase
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询 socket 连接信息
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("getSocket")]
|
2024-06-20 09:41:02 +08:00
|
|
|
|
public WcsApiResponse<List<AppTcp>> GetDB() => socketService.GetDB();
|
2024-05-14 16:30:56 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 编辑 socket
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost("editSocket")]
|
2024-06-20 09:41:02 +08:00
|
|
|
|
public WcsApiResponse EditSocket([FromBody] EditSocketRequest request) => socketService.EditSocket(request);
|
2024-05-14 16:30:56 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除一条信息
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="socketNoStr"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpDelete("deleteSocket")]
|
2024-06-20 09:41:02 +08:00
|
|
|
|
public WcsApiResponse DeleteSocket([FromQuery(Name = "socketNo")] string? socketNoStr) => socketService.DeleteSocket(socketNoStr);
|
|
|
|
|
|
|
2024-05-14 16:30:56 +08:00
|
|
|
|
}
|