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
32
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_BasicInfoServices;
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 ActivationCodeController : ApiBaseController<IActivationCodeService, Dt_ActivationCode>
    {
        public ActivationCodeController(IActivationCodeService service) : base(service)
        {
        }
 
        /// <summary>
        /// 生成激活码
        /// </summary>
        /// <param name="activationDTO">包含生成激活码所需信息的DTO对象</param>
        /// <returns>生成的激活码字符串</returns>
        [HttpPost("GenerateActivationCode"), AllowAnonymous]
        public string GenerateActivationCode([FromBody] ActivationCodeDTO activationDTO)
        {
            return Service.GenerateActivationCode(activationDTO);
        }
 
    }
}