config.go
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package protocol
/*ConfigScore 评分配置模式*/
type ConfigScoreRequest struct {
Id int `json:"id"`
ScoreConfig
}
type ScoreConfig struct {
DiscoveryScore *DiscoveryScore `json:"discoveryScore"`
SumScore *SumScore `json:"sumScore"`
BasicScore *ScoreRange `json:"basicScore"`
ExtraScore *ScoreRange `json:"extraScore"`
ValueScore *ScoreRange `json:"valueScore"`
}
type ConfigScoreResponse struct {
}
/*GetConfigScore */
type GetConfigScoreRequest struct {
}
type GetConfigScoreResponse struct {
ScoreConfig
}
//发现评分计算规则
type DiscoveryScore struct {
BasicFactor float64 `json:"basicFactor"` //基础分系数
ExtraFactor float64 `json:"extraFactor"` //附加分系数
ValueFactor float64 `json:"valueFactor"` //价值分系数
}
//总分计算规则
type SumScore struct {
DiscoveryFactor float64 `json:"discoveryFactor"` //发现分系数
CatchFactor float64 `json:"catchFactor"` //抓住分系数
}
type ScoreRange struct {
Min float64 `json:"min"` //最小分
Max float64 `json:"max"` //最大分
Step float64 `json:"step"` //步长
}