|
|
@@ -64,7 +64,7 @@ public class @(Model.ClassName)Service : IDynamicApiController, ITransient
|
|
|
} else if (column.NetType.TrimEnd('?') == "int" || column.NetType.TrimEnd('?') == "long") {
|
|
|
@:.WhereIF(input.@(column.PropertyName) != null, u => u.@(column.PropertyName) @(column.QueryType) input.@(column.PropertyName))
|
|
|
} else if (column.NetType.TrimEnd('?').EndsWith("Enum")) {
|
|
|
- @:.WhereIF(input.@(column.PropertyName).HasValue, u => u.@(column.PropertyName) == input.@(column.PropertyName))
|
|
|
+ @:.WhereIF(input.@(column.PropertyName).HasValue, u => u.@(column.PropertyName) == (int)input.@(column.PropertyName))
|
|
|
} else if (column.NetType.TrimEnd('?') == "DateTime" && column.QueryType == "~") {
|
|
|
@:.WhereIF(input.@(column.PropertyName)Range?.Length == 2, u => u.@(column.PropertyName) >= input.@(column.PropertyName)Range[0] && u.@(column.PropertyName) <= input.@(column.PropertyName)Range[1])
|
|
|
}
|
|
|
@@ -79,7 +79,11 @@ public class @(Model.ClassName)Service : IDynamicApiController, ITransient
|
|
|
@:.Select((@joinTableName) => new @(Model.ClassName)Output
|
|
|
@:{
|
|
|
foreach (var column in Model.TableField) {
|
|
|
+ if(column.NetType.TrimEnd('?').EndsWith("Enum")) {
|
|
|
+ @:@(column.PropertyName) = (@(column.NetType))u.@(column.PropertyName),
|
|
|
+ }else{
|
|
|
@:@(column.PropertyName) = u.@(column.PropertyName),
|
|
|
+ }
|
|
|
if (column.EffectType == "ForeignKey" || column.EffectType == "ApiTreeSelector") {
|
|
|
@:@(column.ExtendedPropertyName) = @column.GetDisplayColumn(column.LowerPropertyNameTrimEndId),
|
|
|
}
|