diff --git a/ZR.Admin.WebApi/Controllers/CommonController.cs b/ZR.Admin.WebApi/Controllers/CommonController.cs index 591d78f..d331494 100644 --- a/ZR.Admin.WebApi/Controllers/CommonController.cs +++ b/ZR.Admin.WebApi/Controllers/CommonController.cs @@ -37,7 +37,7 @@ namespace ZR.Admin.WebApi.Controllers /// 心跳 /// /// - [HttpGet, Route("health/index")] + [HttpGet] public IActionResult Health() { return SUCCESS(true); diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplControllers.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplControllers.txt index b99d464..91f9590 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplControllers.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplControllers.txt @@ -52,7 +52,7 @@ namespace ${options.ApiControllerNamespace}.Controllers //搜索条件查询语法参考Sqlsugar ${QueryCondition} -$if(genTable.SortField != "") +$if(genTable.SortField != "" && genTable.SortField != null) var response = _${replaceDto.ModelTypeName}Service.GetPages(predicate.ToExpression(), parm, x => x.${genTable.SortField}, "${genTable.SortType}"); $else var response = _${replaceDto.ModelTypeName}Service.GetPages(predicate.ToExpression(), parm); @@ -160,7 +160,7 @@ ${end} string sFileName = ExportExcel(list, "${replaceDto.ModelTypeName}", "${genTable.FunctionName}"); return SUCCESS(new { path = "/export/" + sFileName, fileName = sFileName }); } -$if(genTable.SortField != "") +$if(genTable.SortField != "" && genTable.SortField != null) ////// ////// 代码自动生成(不用可删除) 保存排序 ////// diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplVue.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplVue.txt index 35ea5ff..8f42fec 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplVue.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplVue.txt @@ -20,7 +20,7 @@ ${vueQueryFormHtml} 删除 - + 导出 $if(genTable.SortField != "" && 1 == 2) @@ -33,7 +33,7 @@ $end - + ${VueViewListContent}