|
@@ -95,6 +95,8 @@ func ImportDataByExcel(mf multipart.File, eid int64, entid string) (int, int64,
|
|
defer common.Catch()
|
|
defer common.Catch()
|
|
now := time.Now()
|
|
now := time.Now()
|
|
importDataNum := 0
|
|
importDataNum := 0
|
|
|
|
+
|
|
|
|
+ var numLock sync.Mutex
|
|
var saveEsArr []map[string]interface{}
|
|
var saveEsArr []map[string]interface{}
|
|
binary, _ := io.ReadAll(mf)
|
|
binary, _ := io.ReadAll(mf)
|
|
xls, _ := xlsx.OpenBinary(binary)
|
|
xls, _ := xlsx.OpenBinary(binary)
|
|
@@ -209,7 +211,9 @@ func ImportDataByExcel(mf multipart.File, eid int64, entid string) (int, int64,
|
|
if tmp["infoid"] == nil {
|
|
if tmp["infoid"] == nil {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ numLock.Lock()
|
|
importDataNum++
|
|
importDataNum++
|
|
|
|
+ numLock.Unlock()
|
|
if common.ObjToString(tmp["href"]) == "#" || strings.Contains(common.ObjToString(tmp["href"]), "jianyu360.cn") {
|
|
if common.ObjToString(tmp["href"]) == "#" || strings.Contains(common.ObjToString(tmp["href"]), "jianyu360.cn") {
|
|
tmp["isCompetitors"] = "是"
|
|
tmp["isCompetitors"] = "是"
|
|
} else {
|
|
} else {
|