摘要: 在后台接口处理时,经常需要对请求的参数做验证。因此提取了共通方法,方便进行判断。 /// <summary> /// 数据验证工具类 /// </summary> public static class CheckUtil { /// <summary> /// 验证对象中的字段是否为空 /// < 阅读全文
posted @ 2021-10-10 15:28 Nine_Jason 阅读(1725) 评论(0) 推荐(0) 编辑
摘要: 对策: 1.进入线程池画面,将当前程序的线程池设为“无托管代码” 2.修改配置文件 Web.config,加上配置 原因: 因为.NetCore 5.0 自带集成了Swagger , 在发布项目时,通常会在代码中限制ASPNETCORE_ENVIRONMENT为Production时关闭Swagge 阅读全文
posted @ 2021-09-17 13:52 Nine_Jason 阅读(1122) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 金额数字转大写(带小数点) /// </summary> public static string PriceToCn(decimal price) { //数字转大写 string[] n = { "零", "壹", "贰", "叁", "肆", "伍", "陆 阅读全文
posted @ 2021-09-17 13:46 Nine_Jason 阅读(477) 评论(2) 推荐(1) 编辑
摘要: 在 Nuget 中导入需要的插件: 实现的代码: 1 [HttpGet, Route("CreatePdf")] 2 public Response CreatePdf() 3 { 4 Response resp = new Response(); 5 resp.StartTime = DateTi 阅读全文
posted @ 2021-09-08 11:21 Nine_Jason 阅读(548) 评论(0) 推荐(0) 编辑