|
@@ -47,7 +47,7 @@ func SyncRankingFromIne() {
|
|
}
|
|
}
|
|
existIndexMap := make(map[string]*models.BaseFromTradeIneIndex)
|
|
existIndexMap := make(map[string]*models.BaseFromTradeIneIndex)
|
|
addIndexMap := make(map[string]string)
|
|
addIndexMap := make(map[string]string)
|
|
- indexCodeMap := make(map[string]string)
|
|
|
|
|
|
+ indexCodeMap := make(map[string]struct{})
|
|
for _, v := range allIndex {
|
|
for _, v := range allIndex {
|
|
indexKey := v.IndexName
|
|
indexKey := v.IndexName
|
|
existIndexMap[indexKey] = v
|
|
existIndexMap[indexKey] = v
|
|
@@ -82,7 +82,7 @@ func SyncRankingFromIne() {
|
|
for {
|
|
for {
|
|
indexCode = fmt.Sprintf("SHEE%s", time.Now().Format(utils.FormatDateTimeUnSpace)+strconv.Itoa(utils.GetRandInt(1, 100)))
|
|
indexCode = fmt.Sprintf("SHEE%s", time.Now().Format(utils.FormatDateTimeUnSpace)+strconv.Itoa(utils.GetRandInt(1, 100)))
|
|
if _, ok := indexCodeMap[indexCode]; !ok {
|
|
if _, ok := indexCodeMap[indexCode]; !ok {
|
|
- indexCodeMap[indexCode] = ""
|
|
|
|
|
|
+ indexCodeMap[indexCode] = struct{}{}
|
|
break
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -151,7 +151,7 @@ func SyncRankingFromIne() {
|
|
for {
|
|
for {
|
|
indexCode = fmt.Sprintf("SHEE%s", time.Now().Format(utils.FormatDateTimeUnSpace)+strconv.Itoa(utils.GetRandInt(1, 100)))
|
|
indexCode = fmt.Sprintf("SHEE%s", time.Now().Format(utils.FormatDateTimeUnSpace)+strconv.Itoa(utils.GetRandInt(1, 100)))
|
|
if _, ok := indexCodeMap[indexCode]; !ok {
|
|
if _, ok := indexCodeMap[indexCode]; !ok {
|
|
- indexCodeMap[indexCode] = ""
|
|
|
|
|
|
+ indexCodeMap[indexCode] = struct{}{}
|
|
break
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -219,7 +219,7 @@ func SyncRankingFromIne() {
|
|
for {
|
|
for {
|
|
indexCode = fmt.Sprintf("SHEE%s", time.Now().Format(utils.FormatDateTimeUnSpace)+strconv.Itoa(utils.GetRandInt(1, 100)))
|
|
indexCode = fmt.Sprintf("SHEE%s", time.Now().Format(utils.FormatDateTimeUnSpace)+strconv.Itoa(utils.GetRandInt(1, 100)))
|
|
if _, ok := indexCodeMap[indexCode]; !ok {
|
|
if _, ok := indexCodeMap[indexCode]; !ok {
|
|
- indexCodeMap[indexCode] = ""
|
|
|
|
|
|
+ indexCodeMap[indexCode] = struct{}{}
|
|
break
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|