|
@@ -705,10 +705,13 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
toptype = append(toptype, "9999")
|
|
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, ",")))
|
|
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, ",")))
|
|
querys = append(querys, fmt.Sprintf("a.toptype in (%s)", strings.Join(toptype, ",")))
|
|
}
|
|
}
|
|
}
|
|
}
|