mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Update conditional query
This commit is contained in:
parent
49745f31ae
commit
bc20986171
@ -188,7 +188,15 @@ namespace SqlSugar
|
||||
break;
|
||||
case ConditionalType.In:
|
||||
if (item.FieldValue == null) item.FieldValue = string.Empty;
|
||||
var inValue1 = ("(" + item.FieldValue.Split(',').ToJoinSqlInVals() + ")");
|
||||
var inValue1 = string.Empty;
|
||||
if (item.CSharpTypeName.EqualCase("string"))
|
||||
{
|
||||
inValue1 = ("(" + item.FieldValue.Split(',').Distinct().ToArray().ToJoinSqlInVals() + ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
inValue1 = ("(" + item.FieldValue.Split(',').Select(it=>it==""?"null":it).Distinct().ToArray().ToJoinSqlInVals() + ")");
|
||||
}
|
||||
if (item.CSharpTypeName.HasValue()&&UtilMethods.IsNumber(item.CSharpTypeName))
|
||||
{
|
||||
inValue1= inValue1.Replace("'","");
|
||||
|
Loading…
Reference in New Issue
Block a user