修改Mid如果是枚举筛选生成报错问题

This commit is contained in:
侯炯 2025-07-18 19:55:42 +08:00
parent 92438e9085
commit 3e14f22547

View File

@ -64,7 +64,7 @@ public partial class @(@Model.ClassName)Mid
@:.WhereIF(!string.IsNullOrWhiteSpace(input.@column.PropertyName), u => u.@(@column.PropertyName) @column.QueryType input.@(@column.PropertyName))
}
}else if(@column.NetType?.TrimEnd('?') == "int" || @column.NetType?.TrimEnd('?') == "long"){
@:.WhereIF(input.@column.PropertyName>0, u => u.@(@column.PropertyName) @column.QueryType input.@(@column.PropertyName))
@:.WhereIF(input.@column.PropertyName>0, u => (int)u.@(@column.PropertyName) @column.QueryType input.@(@column.PropertyName))
}else if(@column.NetType?.TrimEnd('?') == "DateTime" && @column.QueryType == "~"){
@:.WhereIF(input.@(@column.PropertyName)Range != null && input.@(@column.PropertyName)Range.Length == 2, u => u.@(@column.PropertyName) >= input.@(@column.PropertyName)Range[0] && u.@(@column.PropertyName) <= input.@(@column.PropertyName)Range[1])
}else if(@column.NetType?.TrimEnd('?').EndsWith("Enum") == true) {