|
@@ -37,41 +37,6 @@ func GetEntDataExportCount(_id string, entId, entUserId, limitNum, current int,
|
|
|
log.Println("企业数据导出错误 ", err)
|
|
|
return 0, 0, nil
|
|
|
}
|
|
|
- // secondCount := 0
|
|
|
-
|
|
|
- // isOK := true
|
|
|
- // if secondCount > current {
|
|
|
- // isOK = false
|
|
|
- // }
|
|
|
- //for _, v := range *res {
|
|
|
- // searchsWaitGroup.Add(1)
|
|
|
- // searchsPool <- true
|
|
|
- // id := util.ObjToString(v["_id"])
|
|
|
- // go func(id string) {
|
|
|
- // defer func() {
|
|
|
- // searchsWaitGroup.Done()
|
|
|
- // <-searchsPool
|
|
|
- // }()
|
|
|
- // isExist, err := redis.Exists("other", "entexportdata_"+id+"_"+fmt.Sprintln(entId))
|
|
|
- // if err != nil {
|
|
|
- // log.Println("企业搜索数据导出redis判重失败")
|
|
|
- // } else if isExist {
|
|
|
- // log.Println("数据重复,id ", id, "entid ", entId, "userid ", entUserId)
|
|
|
- // return
|
|
|
- // }
|
|
|
- // newCountPool <- true
|
|
|
- // if !isFirst {
|
|
|
- // redis.Put("other", "entexportdata_"+id+"_"+fmt.Sprintln(entId), 1, -1)
|
|
|
- // }
|
|
|
- // }(id)
|
|
|
- // if !isFirst {
|
|
|
- // delete(v, "_id")
|
|
|
- // v["entid"] = entId
|
|
|
- // v["userid"] = entUserId
|
|
|
- // v["infoid"] = id
|
|
|
- // v["createtime"] = time.Now().Unix()
|
|
|
- // }
|
|
|
- //}
|
|
|
// 20210716 由原来的redis判重改为调用判重中台接口进行判重
|
|
|
m := map[string]bool{}
|
|
|
infoIdList := []string{}
|
|
@@ -96,7 +61,7 @@ func GetEntDataExportCount(_id string, entId, entUserId, limitNum, current int,
|
|
|
"isInsert": insertFlag,
|
|
|
"isEnt": "true",
|
|
|
})
|
|
|
- if err5 != nil {
|
|
|
+ if err5 != nil|| rs["code"]!=0 {
|
|
|
log.Println("企业订阅数据导出接口判重失败", err5)
|
|
|
} else {
|
|
|
log.Println("企业订阅数据导出")
|
|
@@ -126,7 +91,7 @@ func GetEntDataExportCount(_id string, entId, entUserId, limitNum, current int,
|
|
|
"isInsert": insertFlag,
|
|
|
"isEnt": "true",
|
|
|
})
|
|
|
- if err5 != nil {
|
|
|
+ if err5 != nil|| util.IntAll(rs["code"])!=0{
|
|
|
log.Println("企业订阅数据导出接口判重失败", err5)
|
|
|
} else {
|
|
|
log.Println("企业订阅数据导出")
|