2025-07-04 09:50:02 +08:00
|
|
|
|
using MyCode.Project.Infrastructure.Common;
|
2025-07-07 09:35:11 +08:00
|
|
|
|
using MyCode.Project.Services;
|
2025-07-04 09:50:02 +08:00
|
|
|
|
using System.Web.Http;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MyCode.Project.WebApi.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 测试接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class TestController : BaseAPIController
|
2025-07-07 09:35:11 +08:00
|
|
|
|
{
|
|
|
|
|
|
private IJackYunService _jackYunService;
|
|
|
|
|
|
public TestController(IJackYunService jackYunService )
|
2025-07-04 09:50:02 +08:00
|
|
|
|
{
|
2025-07-07 09:35:11 +08:00
|
|
|
|
_jackYunService = jackYunService;
|
2025-07-04 09:50:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-07-07 09:35:11 +08:00
|
|
|
|
|
|
|
|
|
|
#region 订单查询
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 订单查询
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public string testTradeFullInfoGet()
|
|
|
|
|
|
{
|
|
|
|
|
|
return _jackYunService.testTradeFullInfoGet();
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2025-07-04 09:50:02 +08:00
|
|
|
|
|
|
|
|
|
|
//#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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|