RecallMergerResult.java
3.12 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
package com.yoho.search.models.recall;
import com.yoho.search.service.recall.strategy.StrategyEnum;
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 SknResult {
private Integer productSkn;
private String intervalKey;
private StrategyEnum strategy;
private Integer brandId;
private Integer middleSortId;
private Integer priceArea;
private Integer heatValue;
private String factor;
private Double score;
private boolean likePriceArea;
private boolean onlyOneStrategy;
public SknResult(Integer productSkn,String intervalKey) {
this.productSkn = productSkn;
this.intervalKey = intervalKey;
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();
}
public void setStrategy(StrategyEnum strategy) {
this.strategy = strategy;
}
public void setOnlyOneStrategy(boolean onlyOneStrategy) {
this.onlyOneStrategy = onlyOneStrategy;
}
public void setScore(Double score) {
this.score = score;
}
public void setLikePriceArea(boolean likePriceArea) {
this.likePriceArea = likePriceArea;
}
/**************************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;
}
}
}