Update nav query

This commit is contained in:
sunkaixuan 2023-02-20 21:38:59 +08:00
parent 48bb29893c
commit 671567d9a9
2 changed files with 5 additions and 1 deletions

View File

@ -44,7 +44,7 @@ namespace SqlSugar
FieldName = item.LeftEntityColumn.DbColumnName,
ConditionalType = ConditionalType.Equal,
FieldValue = item.RightEntityColumn.PropertyInfo.GetValue(model).ObjToString(),
CSharpTypeName = item.RightEntityColumn.PropertyInfo.PropertyType.Name
CSharpTypeName =UtilMethods.GetUnderType(item.RightEntityColumn.PropertyInfo.PropertyType).Name
}));
i++;
}

View File

@ -782,6 +782,10 @@ namespace SqlSugar
CSharpTypeName = ctypename,
FieldValue = value
};
if (item.FieldValue == string.Empty && item.CSharpTypeName.HasValue() && !item.CSharpTypeName.EqualCase("string"))
{
return null;
}
if (item.CSharpTypeName.EqualCase(UtilConstants.DecType.Name))
{
return Convert.ToDecimal(item.FieldValue);