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