|
@@ -4,7 +4,6 @@ import (
|
|
"analyze/internal/consts"
|
|
"analyze/internal/consts"
|
|
"analyze/internal/model"
|
|
"analyze/internal/model"
|
|
"analyze/internal/model/entity"
|
|
"analyze/internal/model/entity"
|
|
- "app.yhyue.com/moapp/jybase/common"
|
|
|
|
"app.yhyue.com/moapp/jybase/encrypt"
|
|
"app.yhyue.com/moapp/jybase/encrypt"
|
|
"fmt"
|
|
"fmt"
|
|
"github.com/gogf/gf/v2/database/gredis"
|
|
"github.com/gogf/gf/v2/database/gredis"
|
|
@@ -194,7 +193,10 @@ func EncodeId(sid string) string {
|
|
func UpdateWinnerInfoOfScore(key string, pt *entity.ProjectInfo, score float64) {
|
|
func UpdateWinnerInfoOfScore(key string, pt *entity.ProjectInfo, score float64) {
|
|
if pt.Winners != "" {
|
|
if pt.Winners != "" {
|
|
for k, w := range strings.Split(pt.Winners, ",") {
|
|
for k, w := range strings.Split(pt.Winners, ",") {
|
|
- id := common.If(len(pt.Entidlist) > k, encrypt.EncodeArticleId2ByCheck(pt.Entidlist[k]), "").(string)
|
|
|
|
|
|
+ id := ""
|
|
|
|
+ if len(pt.Entidlist) > k {
|
|
|
|
+ id = encrypt.EncodeArticleId2ByCheck(pt.Entidlist[k])
|
|
|
|
+ }
|
|
UpdateIncrementRedis(key, fmt.Sprintf("%s##%s", w, id), score)
|
|
UpdateIncrementRedis(key, fmt.Sprintf("%s##%s", w, id), score)
|
|
}
|
|
}
|
|
}
|
|
}
|