Commit 08395160 authored by 黄奎's avatar 黄奎

匹配规则修改

parent 3f0250e3
......@@ -57,6 +57,21 @@ WHERE 1=1
builder.AppendFormat(" AND A.{0} LIKE @KeyWords4 ",nameof(RB_Comment_Extend.KeyWords));
parameters.Add("KeyWords4", "%数学%");
}
if (query.KeyWords.Contains("物理"))
{
builder.AppendFormat(" AND A.{0} LIKE @KeyWords5 ", nameof(RB_Comment_Extend.KeyWords));
parameters.Add("KeyWords5", "%物理%");
}
if (query.KeyWords.Contains("英语"))
{
builder.AppendFormat(" AND A.{0} LIKE @KeyWords6 ", nameof(RB_Comment_Extend.KeyWords));
parameters.Add("KeyWords6", "%英语%");
}
if (query.KeyWords.Contains("语文"))
{
builder.AppendFormat(" AND A.{0} LIKE @KeyWords7 ", nameof(RB_Comment_Extend.KeyWords));
parameters.Add("KeyWords7", "%语文%");
}
}
if (query.CommentTimes > 0)
{
......@@ -70,7 +85,7 @@ WHERE 1=1
//强制匹配关键词
if (query.IsMatchKeyWords == 1)
{
if (parameters != null && parameters.ParameterNames.Count()>0)
if (parameters != null && parameters.ParameterNames.Count()>=2)
{
list = base.Get<RB_Comment_Extend>(builder.ToString(), parameters).ToList();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment