xuzhiheng 5 gadi atpakaļ
vecāks
revīzija
5a2cbb4509
1 mainītis faili ar 6 papildinājumiem un 5 dzēšanām
  1. 6 5
      src/history/task.go

+ 6 - 5
src/history/task.go

@@ -234,7 +234,7 @@ func (c *Customer) GetData(stype string) {
 									因为要记录所有匹配上的关键词,所有优先匹配附加词,在匹配关键词
 								*/
 								//1.附加词匹配
-								IsMatch := true
+								IsMatch := false
 								// qu.Debug("sr.AW---", len(sr.AW))
 								for i, aw := range sr.AW {
 									// qu.Debug("-------------------------开始附加词匹配--------------------------")
@@ -247,13 +247,14 @@ func (c *Customer) GetData(stype string) {
 										// qu.Debug("-------------------------开始关键词匹配--------------------------")
 										IsMatchKey := RegMatch(fieldText, kw.MatchType, kw.KeyReg, matchKey, matchKeyType, true, false)
 										// qu.Debug(IsMatchKey, "------------------------------------------------------------")
-										if !IsMatchKey {
-											IsMatch = false
+										if IsMatchKey {
+											IsMatch = true
 										}
-									} else {
-										IsMatch = false
 									}
 								}
+								if len(sr.AW) == 0 {
+									IsMatch = true
+								}
 								/*
 									到此已经匹配完数据
 								*/