|
@@ -570,9 +570,21 @@ func getListInfo(spidercode, stype, field string) []map[string]interface{} {
|
|
|
maxint := qu.IntAll(Max)
|
|
|
numMap["$lte"] = maxint
|
|
|
}
|
|
|
- if len(numMap) > 0 {
|
|
|
- query[field] = numMap
|
|
|
+ if len(numMap) > 0 { //给定了区间,查询此区间或者budget、bidamount不存在的数据
|
|
|
+ //query[field] = numMap
|
|
|
+ delete(query, field)
|
|
|
+ query["$or"] = []interface{}{
|
|
|
+ map[string]interface{}{
|
|
|
+ field: map[string]interface{}{
|
|
|
+ "$exists": false,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ map[string]interface{}{
|
|
|
+ field: numMap,
|
|
|
+ },
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
qu.Debug("query:", util.Coll, query)
|