maxiaoshan 5 anos atrás
pai
commit
9e18cfd386
1 arquivos alterados com 12 adições e 8 exclusões
  1. 12 8
      udpcreateindex/src/projectindex.go

+ 12 - 8
udpcreateindex/src/projectindex.go

@@ -23,17 +23,21 @@ func projectTask(data []byte, project, mapInfo map[string]interface{}) {
 				"$lte": util.StringTOBsonId(mapInfo["lteid"].(string)),
 			},
 		}
-	}
-	idMap, _ := q["_id"].(map[string]interface{})
-	if idMap != nil {
-		tmpQ := map[string]interface{}{}
-		for c, id := range idMap {
-			if idStr, ok := id.(string); ok && id != "" {
-				tmpQ[c] = util.StringTOBsonId(idStr)
+	} else {
+		if q["pici"] == nil {
+			idMap, _ := q["_id"].(map[string]interface{})
+			if idMap != nil {
+				tmpQ := map[string]interface{}{}
+				for c, id := range idMap {
+					if idStr, ok := id.(string); ok && id != "" {
+						tmpQ[c] = util.StringTOBsonId(idStr)
+					}
+				}
+				q["_id"] = tmpQ
 			}
 		}
-		q["_id"] = tmpQ
 	}
+
 	var session *mgov.Session
 	if project["addr"] != nil {
 		session = project2db.GetMgoConn(3600)