diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplModel.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplModel.txt index bb30e0c..7994a80 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplModel.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplModel.txt @@ -8,8 +8,7 @@ $end namespace ${options.ModelsNamespace}.${options.SubNamespace} { /// - /// ${genTable.FunctionName},数据实体对象 - /// + /// ${genTable.FunctionName} /// @author ${replaceDto.Author} /// @date ${replaceDto.AddTime} /// diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplService.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplService.txt index f0b3697..bc21298 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplService.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplService.txt @@ -38,8 +38,13 @@ $if(column.HtmlType == "selectMulti") $elseif(column.CsharpType == "string") predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.${column.CsharpField}), ${codeTool.QueryExp(column.CsharpField, column.QueryType)}; $elseif(column.CsharpType == "DateTime") +$if(column.HtmlType == "month") + DateTime monthEnd = Convert.ToDateTime(parm.${column.CsharpField}).AddMonths(1); + predicate = predicate.AndIF(parm.${column.CsharpField} != null, it => it.${column.CsharpField} >= parm.${column.CsharpField} && it.${column.CsharpField} < monthEnd); +$else predicate = predicate.AndIF(parm.Begin${column.CsharpField} == null, it => it.${column.CsharpField} >= DateTime.Now.AddDays(-1)); predicate = predicate.AndIF(parm.Begin${column.CsharpField} != null, it => it.${column.CsharpField} >= parm.Begin${column.CsharpField} && it.${column.CsharpField} <= parm.End${column.CsharpField}); +$end $elseif(column.CsharpType == "int" || column.CsharpType == "long") predicate = predicate.AndIF(parm.${column.CsharpField} != null, ${codeTool.QueryExp(column.CsharpField, column.QueryType)}; $end diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/v3/Vue.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/v3/Vue.txt index a0569d6..ddabd36 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/v3/Vue.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/v3/Vue.txt @@ -23,14 +23,23 @@ $end $if(column.CsharpType == "int" || column.CsharpType == "long") $set(numLabel = ".number") $end -$if(column.HtmlType == "datetime") +$if(column.HtmlType == "month") + + + + +$elseif(column.HtmlType == "datetime") - - 清空 + {{ ${t}t('btn.clean') }} $end @@ -163,13 +172,13 @@ $if(column.HtmlType == "customInput" && column.IsPk == false) $elseif(column.HtmlType == "imageUpload") +$elseif(column.HtmlType == "datetime") + $else $end @@ -243,7 +254,7 @@ $if(column.HtmlType == "inputNumber" || column.HtmlType == "customInput") -$elseif(column.HtmlType == "datetime") +$elseif(column.HtmlType == "datetime" || column.HtmlType == "month") @@ -265,7 +276,7 @@ $elseif(column.HtmlType == "radio" || column.HtmlType == "selectRadio") - {{item.dictLabel}} + {{item.dictLabel}} @@ -286,8 +297,9 @@ $elseif(column.HtmlType == "select" || column.HtmlType == "selectMulti") @@ -296,7 +308,9 @@ $elseif(column.HtmlType == "checkbox") - {{item.dictLabel}} + + {{item.dictLabel}} + @@ -335,7 +349,7 @@ import Editor from '@/components/Editor' $end const { proxy } = getCurrentInstance() -// 选中${replaceDto.FistLowerPk}数组数组 +// 选中${replaceDto.FistLowerPk}数组 const ids = ref([]) const loading = ref(false) const showSearch = ref(true) diff --git a/ZR.Service/System/GenTableService.cs b/ZR.Service/System/GenTableService.cs index 9490f85..47e398d 100644 --- a/ZR.Service/System/GenTableService.cs +++ b/ZR.Service/System/GenTableService.cs @@ -153,10 +153,11 @@ namespace ZR.Service.System column.DictType = prevColumn.DictType; column.QueryType = prevColumn.QueryType; } - if (column.ColumnComment.IsEmpty()) - { - column.ColumnComment = prevColumn.ColumnComment; - } + //不同步列说明 + //if (column.ColumnComment.IsEmpty()) + //{ + // column.ColumnComment = prevColumn.ColumnComment; + //} updateColumns.Add(column); } }