|
@@ -5,6 +5,7 @@ import (
|
|
|
"fmt"
|
|
|
ju "jy/util"
|
|
|
"log"
|
|
|
+ "os"
|
|
|
qu "qfw/util"
|
|
|
"regexp"
|
|
|
"strconv"
|
|
@@ -28,6 +29,9 @@ func init() {
|
|
|
qu.ReadConfig("./res/tagscoredesc.json", &TagConfigDesc)
|
|
|
qu.ReadConfig("./res/tagscore.json", &TagConfig)
|
|
|
qu.ReadConfig("./res/fieldscore.json", &SoreConfig)
|
|
|
+ if SoreConfig == nil { //配置出错,强退
|
|
|
+ os.Exit(0)
|
|
|
+ }
|
|
|
if repeat, ok := SoreConfig["other"]["repeat"].(map[string]interface{}); ok {
|
|
|
RepeatScore = qu.Float64All(repeat["score"])
|
|
|
}
|
|
@@ -117,12 +121,12 @@ func ScoreFields(j *ju.Job, ftag map[string][]*Tag) map[string][]*ju.ExtField {
|
|
|
if field == "budget" || field == "bidamount" {
|
|
|
if tmpsvalue.IsTrue {
|
|
|
//continue
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
tmps[tmpsindex].Score = -10
|
|
|
tmps[tmpsindex].ScoreItem = append(tmps[tmpsindex].ScoreItem, &ju.ScoreItem{Des: `value结果为空直接-10分`, Code: field, Value: tmpsvalue.Value, Score: -10})
|
|
|
continue
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
tmps[tmpsindex].Score = -10
|
|
|
tmps[tmpsindex].ScoreItem = append(tmps[tmpsindex].ScoreItem, &ju.ScoreItem{Des: `value结果为空直接-10分`, Code: field, Value: tmpsvalue.Value, Score: -10})
|
|
|
continue
|