语句式查询的查询条件处理

temp
ddlucky 2 years ago
parent ede22c97f5
commit 6810059f83

@ -180,14 +180,27 @@ namespace VOL.Core.BaseProvider
if (searchparam == HtmlElementType.like) item.Value = $"%{item.Value}%"; if (searchparam == HtmlElementType.like)
{
item.Value = $"%{item.Value}%";
QuerySql += $" and {searchname} {searchparam} '{item.Value}' ";
}
else
if (searchparam == HtmlElementType.StartWith) if (searchparam == HtmlElementType.StartWith)
{ {
searchparam = HtmlElementType.like; searchparam = HtmlElementType.like;
item.Value = $"{item.Value}%"; item.Value = $"{item.Value}%";
QuerySql += $" and {searchname} {searchparam} '{item.Value}' ";
} }
else
if (searchparam == "in")
{
//searchparam = HtmlElementType.like;
//item.Value = $"{item.Value}%";
var _str = item.Value.Replace(",", "','");
QuerySql += $" and {searchname} in ('{_str}') ";
}
else
QuerySql += $" and {searchname} {searchparam} '{item.Value}' "; QuerySql += $" and {searchname} {searchparam} '{item.Value}' ";

Loading…
Cancel
Save