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);
|
}
|
|
}
|
}
|