Files
YunTongJackYunTask/Reportapi/MyCode.Project.WebApi/Controllers/TestController.cs
2025-07-04 09:50:02 +08:00

99 lines
2.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using MyCode.Project.Infrastructure.Common;
using System.Web.Http;
namespace MyCode.Project.WebApi.Controllers
{
/// <summary>
/// 测试接口
/// </summary>
public class TestController : BaseAPIController
{
public TestController( )
{
}
//#region AESEncrypt(AES加密)
///// <summary>
///// AES加密
///// </summary>
///// <param name="text"></param>
///// <returns></returns>
//[HttpGet]
//[AllowAnonymous]
//public string AESEncrypt(string text,string secretKey)
//{
// return AESHelper.AESEncrypt(text, secretKey);
//}
//#endregion
//#region AESDecrypt(AES解密)
///// <summary>
///// AES解密
///// </summary>
///// <param name="text"></param>
///// <returns></returns>
//[AllowAnonymous]
//[HttpGet]
//public string AESDecrypt(string text,string secretKey)
//{
// if (string.IsNullOrWhiteSpace(secretKey))
// {
// return AESHelper.AESDecrypt(text, "");
// }
// return AESHelper.AESDecrypt(text, secretKey);
//}
//#endregion
#region HtmLToXls(html转成xls)
/// <summary>
/// 测试html转成xls
/// </summary>
[AllowAnonymous]
[HttpGet]
public void HtmLToXls()
{
ExcelHelper.HtmlToExcel(@"D:\App_File\2.html", @"D:\App_File\2.xlsx");
}
#endregion
//#region ReportExportAnsy(异步执行导出有带websocket异步推送)
///// <summary>
///// 异步执行导出有带websocket异步推送
///// </summary>
///// <param name="obj"></param>
//[HttpPost]
//public void ReportExportAnsy(AnsyReportExportAct act)
//{
// _reportService.ReportExportAnsy(act);
//}
//#endregion
#region GenerateHS256Key(JWTKEY)
/// <summary>
/// GenerateHS256Key
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
[HttpGet]
[AllowAnonymous]
public string GenerateHS256Key()
{
return JwtKeyGenerator.GenerateHS256Key();
}
#endregion
}
}