z8018
2 天以前 d8dc91f9c1fece5711e38edd1b1274cb9e579015
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.BasicInfo;
using WIDESEA_IBasicInfoServices;
using WIDESEA_Model.Models;
 
namespace WIDESEA_ProductMgmtServer.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class RuntimeCodeController : ApiBaseController<IRuntimeCodeService, Dt_RuntimeCode>
    {
        public RuntimeCodeController(IRuntimeCodeService service) : base(service)
        {
        }
 
        /// <summary>
        /// 处理HTTP POST请求以生成运行时代码。
        /// </summary>
        /// <param name="deviceInfo">包含设备信息的DTO对象,通过请求主体传递。</param>
        /// <returns>包含生成运行时代码结果的WebResponseContent对象。</returns>
        [HttpPost("GenerateRuntimeCode"), AllowAnonymous]
        public WebResponseContent GenerateRuntimeCode([FromBody] DeviceInfoDTO deviceInfo)
        {
            return Service.GenerateRuntimeCode(deviceInfo);
        }
    }
}