RecallMergerResult.java
3.98 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
package com.yoho.search.models.recall;
import com.yoho.search.service.recall.strategy.StrategyEnum;
import java.math.BigDecimal;
import java.util.List;
/**
* 召回的合并结果
*/
public class RecallMergerResult {
private long total;
private List<SknResult> sknList;
public RecallMergerResult(long total, List<SknResult> sknList) {
this.total = total;
this.sknList = sknList;
}
public long getTotal() {
return total;
}
public List<SknResult> getSknList() {
return sknList;
}
public static class SknResultSource {
private StrategyEnum strategyEnum;
private String intervalKey;
public SknResultSource(StrategyEnum strategyEnum, String intervalKey) {
this.strategyEnum = strategyEnum;
this.intervalKey = intervalKey;
}
public StrategyEnum getStrategyEnum() {
return strategyEnum;
}
public String getIntervalKey() {
return intervalKey;
}
}
public static class SknResult {
private Integer productSkn;
private Integer brandId;
private Integer middleSortId;
private Integer priceArea;
private Integer heatValue;
private String factor;
private double uvScore;
private double salesPrice;
private Double score;
private boolean likePriceArea;
private StrategyEnum strategy;
private String intervalKey;
private boolean onlyOneStrategy;
public SknResult(Integer productSkn) {
this.productSkn = productSkn;
this.likePriceArea = false;
}
/**************************set*******************************/
public void setBySknBaseInfo(SknBaseInfoResponse sknBaseInfoResponse) {
this.brandId = sknBaseInfoResponse.getBrandId();
this.middleSortId = sknBaseInfoResponse.getMisortId();
this.priceArea = sknBaseInfoResponse.getPriceArea();
this.heatValue = sknBaseInfoResponse.getHeatValue();
this.factor = sknBaseInfoResponse.getProductFeatureFactor();
this.uvScore = sknBaseInfoResponse.getUvScore();
this.salesPrice = sknBaseInfoResponse.getSalesPrice();
}
public void setScore(Double score) {
this.score = score;
}
public void setLikePriceArea(boolean likePriceArea) {
this.likePriceArea = likePriceArea;
}
public void setSource(SknResultSource sknResultSource, boolean onlyOneStrategy) {
this.strategy = sknResultSource.getStrategyEnum();
this.intervalKey = sknResultSource.getIntervalKey();
this.onlyOneStrategy = onlyOneStrategy;
}
/**************************get*******************************/
public Integer getProductSkn() {
return productSkn;
}
public String getIntervalKey() {
return intervalKey;
}
public Integer getBrandId() {
return brandId;
}
public Integer getMiddleSortId() {
return middleSortId;
}
public Integer getPriceArea() {
return priceArea;
}
public StrategyEnum getStrategy() {
return strategy;
}
public Double getScore() {
return score;
}
public String getFactor() {
return factor;
}
public boolean isLikePriceArea() {
return likePriceArea;
}
public Integer getHeatValue() {
return heatValue;
}
public boolean isOnlyOneStrategy() {
return onlyOneStrategy;
}
public double getUvScore() {
return uvScore;
}
public double getSalesPrice() {
return salesPrice;
}
}
}