99
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
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
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user