Jianghan 1 éve
szülő
commit
1d607f925e
1 módosított fájl, 6 hozzáadás és 3 törlés
  1. 6 3
      jyBXSubscribe/rpc/model/push.go

+ 6 - 3
jyBXSubscribe/rpc/model/push.go

@@ -705,10 +705,13 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 					toptype = append(toptype, "9999")
 				}
 			}
-			if len(subtype) > 0 {
+			if len(subtype) > 0 && len(toptype) > 0 {
+				s1 := fmt.Sprintf("(%s or %s)", fmt.Sprintf("a.subtype in (%s)", strings.Join(subtype, ",")),
+					fmt.Sprintf("a.toptype in (%s)", strings.Join(toptype, ",")))
+				querys = append(querys, s1)
+			} else if len(subtype) > 0 {
 				querys = append(querys, fmt.Sprintf("a.subtype in (%s)", strings.Join(subtype, ",")))
-			}
-			if len(toptype) > 0 {
+			} else if len(toptype) > 0 {
 				querys = append(querys, fmt.Sprintf("a.toptype in (%s)", strings.Join(toptype, ",")))
 			}
 		}