wcc 1 周之前
父節點
當前提交
fd4394497a
共有 2 個文件被更改,包括 4 次插入6 次删除
  1. 二進制
      createEsIndex/createindex
  2. 4 6
      createEsIndex/project_es.go

二進制
createEsIndex/createindex


+ 4 - 6
createEsIndex/project_es.go

@@ -432,12 +432,10 @@ func projectDetailTask(data []byte, mapInfo map[string]interface{}) {
 			projectID := mongodb.BsonIdToSId(tmp["_id"])
 			_, oldProject := Es.GetById(config.Conf.DB.Es.IndexPD, projectID)
 			if oldProject != nil {
-				oldDetail := oldProject["detail"]
-				if oddetail, ok := oldDetail.(string); ok {
-					if oddetail != "" {
-						old_details := strings.Split(oddetail, " ")
-						detail = append(detail, old_details...)
-					}
+				oldDetail := util.ObjToString(oldProject["detail"])
+				if oldDetail != "" {
+					old_details := strings.Split(oldDetail, " ")
+					detail = append(detail, old_details...)
 				}
 			}
 			//统计现有字符串长度