|
@@ -6,229 +6,226 @@ import java.math.BigDecimal; |
|
@@ -6,229 +6,226 @@ import java.math.BigDecimal; |
6
|
|
6
|
|
7
|
public class ProductPriceBO {
|
7
|
public class ProductPriceBO {
|
8
|
|
8
|
|
9
|
- private BigDecimal marketPrice;
|
|
|
10
|
- private BigDecimal salesPrice;
|
|
|
11
|
- private BigDecimal vipPrice;
|
|
|
12
|
- private Integer vipDiscountType;
|
|
|
13
|
- private BigDecimal vip1Price;
|
|
|
14
|
- private BigDecimal vip2Price;
|
|
|
15
|
- private BigDecimal vip3Price;
|
|
|
16
|
- private BigDecimal studentPrice;
|
|
|
17
|
- private BigDecimal studentCoinRate;
|
|
|
18
|
- private Integer updateTime;
|
|
|
19
|
- private Integer lastReducePriceTime;
|
|
|
20
|
- private BigDecimal basicPrice;
|
|
|
21
|
- private Integer productVipStatus;
|
|
|
22
|
- private BigDecimal vipDiscount;
|
|
|
23
|
- private Integer currentVipDiscountType;
|
|
|
24
|
-
|
|
|
25
|
- // others
|
|
|
26
|
- private String isDiscount;
|
|
|
27
|
- private String specialoffer;
|
|
|
28
|
- private Long promotionDiscountInt;
|
|
|
29
|
- private BigDecimal promotionDiscount;
|
|
|
30
|
- private String isStudentPrice;
|
|
|
31
|
- private String isstudentrebate;
|
|
|
32
|
- private String vipLevels;
|
|
|
33
|
-
|
|
|
34
|
- public ProductPriceBO(ProductPrice productPrice) {
|
|
|
35
|
- super();
|
|
|
36
|
- this.marketPrice = productPrice.getRetailPrice();// 吊牌价
|
|
|
37
|
- BigDecimal currentPrice = productPrice.getCurrentPrice();// 综合了变价计划和商品售价的结果,生成的逻辑完全由后台控制。
|
|
|
38
|
- if (currentPrice != null && currentPrice.compareTo(BigDecimal.ZERO) == 1) {
|
|
|
39
|
- this.salesPrice = currentPrice;
|
|
|
40
|
- } else {
|
|
|
41
|
- this.salesPrice = productPrice.getSalesPrice();// 兜底方案
|
|
|
42
|
- }
|
|
|
43
|
- this.vipPrice = productPrice.getVipPrice();
|
|
|
44
|
- this.vipDiscountType = productPrice.getVipDiscountType();
|
|
|
45
|
- this.vip1Price = productPrice.getVip1Price();
|
|
|
46
|
- this.vip2Price = productPrice.getVip2Price();
|
|
|
47
|
- this.vip3Price = productPrice.getVip3Price();
|
|
|
48
|
- this.studentPrice = productPrice.getStudentPrice();
|
|
|
49
|
- this.studentCoinRate = productPrice.getStudentCoinRate();
|
|
|
50
|
- this.updateTime = productPrice.getUpdateTime();
|
|
|
51
|
- this.lastReducePriceTime = productPrice.getLastReducePriceTime();
|
|
|
52
|
- this.basicPrice = productPrice.getBasicPrice();
|
|
|
53
|
- this.productVipStatus = productPrice.getProductVipStatus();
|
|
|
54
|
- this.vipDiscount = productPrice.getVipDiscount();
|
|
|
55
|
- this.currentVipDiscountType = productPrice.getCurrentVipDiscountType();
|
|
|
56
|
- }
|
|
|
57
|
-
|
|
|
58
|
- public Integer getCurrentVipDiscountType() {
|
|
|
59
|
- return currentVipDiscountType;
|
|
|
60
|
- }
|
|
|
61
|
-
|
|
|
62
|
- public void setCurrentVipDiscountType(Integer currentVipDiscountType) {
|
|
|
63
|
- this.currentVipDiscountType = currentVipDiscountType;
|
|
|
64
|
- }
|
|
|
65
|
-
|
|
|
66
|
- public BigDecimal getVipDiscount() {
|
|
|
67
|
- return vipDiscount;
|
|
|
68
|
- }
|
|
|
69
|
-
|
|
|
70
|
- public void setVipDiscount(BigDecimal vipDiscount) {
|
|
|
71
|
- this.vipDiscount = vipDiscount;
|
|
|
72
|
- }
|
|
|
73
|
-
|
|
|
74
|
- public Integer getLastReducePriceTime() {
|
|
|
75
|
- return lastReducePriceTime;
|
|
|
76
|
- }
|
|
|
77
|
-
|
|
|
78
|
- public void setLastReducePriceTime(Integer lastReducePriceTime) {
|
|
|
79
|
- this.lastReducePriceTime = lastReducePriceTime;
|
|
|
80
|
- }
|
|
|
81
|
-
|
|
|
82
|
- public BigDecimal getMarketPrice() {
|
|
|
83
|
- return marketPrice;
|
|
|
84
|
- }
|
|
|
85
|
-
|
|
|
86
|
- public void setMarketPrice(BigDecimal marketPrice) {
|
|
|
87
|
- this.marketPrice = marketPrice;
|
|
|
88
|
- }
|
|
|
89
|
-
|
|
|
90
|
- public BigDecimal getSalesPrice() {
|
|
|
91
|
- return salesPrice;
|
|
|
92
|
- }
|
|
|
93
|
-
|
|
|
94
|
- public void setSalesPrice(BigDecimal salesPrice) {
|
|
|
95
|
- this.salesPrice = salesPrice;
|
|
|
96
|
- }
|
|
|
97
|
-
|
|
|
98
|
- public BigDecimal getVipPrice() {
|
|
|
99
|
- return vipPrice;
|
|
|
100
|
- }
|
|
|
101
|
-
|
|
|
102
|
- public void setVipPrice(BigDecimal vipPrice) {
|
|
|
103
|
- this.vipPrice = vipPrice;
|
|
|
104
|
- }
|
|
|
105
|
-
|
|
|
106
|
- public Integer getVipDiscountType() {
|
|
|
107
|
- return vipDiscountType;
|
|
|
108
|
- }
|
|
|
109
|
-
|
|
|
110
|
- public void setVipDiscountType(Integer vipDiscountType) {
|
|
|
111
|
- this.vipDiscountType = vipDiscountType;
|
|
|
112
|
- }
|
|
|
113
|
-
|
|
|
114
|
- public BigDecimal getVip1Price() {
|
|
|
115
|
- return vip1Price;
|
|
|
116
|
- }
|
|
|
117
|
-
|
|
|
118
|
- public void setVip1Price(BigDecimal vip1Price) {
|
|
|
119
|
- this.vip1Price = vip1Price;
|
|
|
120
|
- }
|
|
|
121
|
-
|
|
|
122
|
- public BigDecimal getVip2Price() {
|
|
|
123
|
- return vip2Price;
|
|
|
124
|
- }
|
|
|
125
|
-
|
|
|
126
|
- public void setVip2Price(BigDecimal vip2Price) {
|
|
|
127
|
- this.vip2Price = vip2Price;
|
|
|
128
|
- }
|
|
|
129
|
-
|
|
|
130
|
- public BigDecimal getVip3Price() {
|
|
|
131
|
- return vip3Price;
|
|
|
132
|
- }
|
|
|
133
|
-
|
|
|
134
|
- public void setVip3Price(BigDecimal vip3Price) {
|
|
|
135
|
- this.vip3Price = vip3Price;
|
|
|
136
|
- }
|
|
|
137
|
-
|
|
|
138
|
- public BigDecimal getStudentPrice() {
|
|
|
139
|
- return studentPrice;
|
|
|
140
|
- }
|
|
|
141
|
-
|
|
|
142
|
- public void setStudentPrice(BigDecimal studentPrice) {
|
|
|
143
|
- this.studentPrice = studentPrice;
|
|
|
144
|
- }
|
|
|
145
|
-
|
|
|
146
|
- public BigDecimal getStudentCoinRate() {
|
|
|
147
|
- return studentCoinRate;
|
|
|
148
|
- }
|
|
|
149
|
-
|
|
|
150
|
- public void setStudentCoinRate(BigDecimal studentCoinRate) {
|
|
|
151
|
- this.studentCoinRate = studentCoinRate;
|
|
|
152
|
- }
|
|
|
153
|
-
|
|
|
154
|
- public String getIsDiscount() {
|
|
|
155
|
- return isDiscount;
|
|
|
156
|
- }
|
9
|
+ private BigDecimal marketPrice;
|
|
|
10
|
+ private BigDecimal vipPrice;
|
|
|
11
|
+ private BigDecimal vip1Price;
|
|
|
12
|
+ private BigDecimal vip2Price;
|
|
|
13
|
+ private BigDecimal vip3Price;
|
|
|
14
|
+ private BigDecimal studentPrice;
|
|
|
15
|
+ private BigDecimal studentCoinRate;
|
|
|
16
|
+ private Integer updateTime;
|
|
|
17
|
+ private Integer lastReducePriceTime;
|
|
|
18
|
+ private BigDecimal basicPrice;
|
|
|
19
|
+ private Integer productVipStatus;
|
|
|
20
|
+ private BigDecimal vipDiscount;
|
|
|
21
|
+
|
|
|
22
|
+ private BigDecimal salesPrice;// 构造的时候使用currentSalesPrice构建
|
|
|
23
|
+ private Integer vipDiscountType;// 构造的时候使用currentVipDiscountType构建
|
|
|
24
|
+
|
|
|
25
|
+ // others
|
|
|
26
|
+ private String isDiscount;
|
|
|
27
|
+ private String specialoffer;
|
|
|
28
|
+ private Long promotionDiscountInt;
|
|
|
29
|
+ private BigDecimal promotionDiscount;
|
|
|
30
|
+ private String isStudentPrice;
|
|
|
31
|
+ private String isstudentrebate;
|
|
|
32
|
+ private String vipLevels;
|
|
|
33
|
+
|
|
|
34
|
+ public ProductPriceBO(ProductPrice productPrice) {
|
|
|
35
|
+ super();
|
|
|
36
|
+ // 使用currentSalesPrice和currentVipDiscountType构建salesPrice和vipDiscountType【综合了变价计划和商品本身价格的结果,生成的逻辑完全由后台控制】
|
|
|
37
|
+ BigDecimal currentPrice = productPrice.getCurrentPrice();//
|
|
|
38
|
+ if (currentPrice != null && currentPrice.compareTo(BigDecimal.ZERO) == 1) {
|
|
|
39
|
+ this.salesPrice = currentPrice;
|
|
|
40
|
+ } else {
|
|
|
41
|
+ this.salesPrice = productPrice.getSalesPrice();// 兜底方案
|
|
|
42
|
+ }
|
|
|
43
|
+ Integer currentVipDiscountType = productPrice.getCurrentVipDiscountType();
|
|
|
44
|
+ if (currentVipDiscountType != null) {
|
|
|
45
|
+ this.vipDiscountType = currentVipDiscountType;
|
|
|
46
|
+ } else {
|
|
|
47
|
+ this.vipDiscountType = productPrice.getVipDiscountType();
|
|
|
48
|
+ }
|
|
|
49
|
+ this.marketPrice = productPrice.getRetailPrice();// 吊牌价
|
|
|
50
|
+ this.vipPrice = productPrice.getVipPrice();
|
|
|
51
|
+ this.vip1Price = productPrice.getVip1Price();
|
|
|
52
|
+ this.vip2Price = productPrice.getVip2Price();
|
|
|
53
|
+ this.vip3Price = productPrice.getVip3Price();
|
|
|
54
|
+ this.studentPrice = productPrice.getStudentPrice();
|
|
|
55
|
+ this.studentCoinRate = productPrice.getStudentCoinRate();
|
|
|
56
|
+ this.updateTime = productPrice.getUpdateTime();
|
|
|
57
|
+ this.lastReducePriceTime = productPrice.getLastReducePriceTime();
|
|
|
58
|
+ this.basicPrice = productPrice.getBasicPrice();
|
|
|
59
|
+ this.productVipStatus = productPrice.getProductVipStatus();
|
|
|
60
|
+ this.vipDiscount = productPrice.getVipDiscount();
|
|
|
61
|
+ }
|
|
|
62
|
+
|
|
|
63
|
+ public BigDecimal getVipDiscount() {
|
|
|
64
|
+ return vipDiscount;
|
|
|
65
|
+ }
|
|
|
66
|
+
|
|
|
67
|
+ public void setVipDiscount(BigDecimal vipDiscount) {
|
|
|
68
|
+ this.vipDiscount = vipDiscount;
|
|
|
69
|
+ }
|
|
|
70
|
+
|
|
|
71
|
+ public Integer getLastReducePriceTime() {
|
|
|
72
|
+ return lastReducePriceTime;
|
|
|
73
|
+ }
|
|
|
74
|
+
|
|
|
75
|
+ public void setLastReducePriceTime(Integer lastReducePriceTime) {
|
|
|
76
|
+ this.lastReducePriceTime = lastReducePriceTime;
|
|
|
77
|
+ }
|
|
|
78
|
+
|
|
|
79
|
+ public BigDecimal getMarketPrice() {
|
|
|
80
|
+ return marketPrice;
|
|
|
81
|
+ }
|
|
|
82
|
+
|
|
|
83
|
+ public void setMarketPrice(BigDecimal marketPrice) {
|
|
|
84
|
+ this.marketPrice = marketPrice;
|
|
|
85
|
+ }
|
|
|
86
|
+
|
|
|
87
|
+ public BigDecimal getSalesPrice() {
|
|
|
88
|
+ return salesPrice;
|
|
|
89
|
+ }
|
|
|
90
|
+
|
|
|
91
|
+ public void setSalesPrice(BigDecimal salesPrice) {
|
|
|
92
|
+ this.salesPrice = salesPrice;
|
|
|
93
|
+ }
|
|
|
94
|
+
|
|
|
95
|
+ public BigDecimal getVipPrice() {
|
|
|
96
|
+ return vipPrice;
|
|
|
97
|
+ }
|
|
|
98
|
+
|
|
|
99
|
+ public void setVipPrice(BigDecimal vipPrice) {
|
|
|
100
|
+ this.vipPrice = vipPrice;
|
|
|
101
|
+ }
|
|
|
102
|
+
|
|
|
103
|
+ public Integer getVipDiscountType() {
|
|
|
104
|
+ return vipDiscountType;
|
|
|
105
|
+ }
|
|
|
106
|
+
|
|
|
107
|
+ public void setVipDiscountType(Integer vipDiscountType) {
|
|
|
108
|
+ this.vipDiscountType = vipDiscountType;
|
|
|
109
|
+ }
|
|
|
110
|
+
|
|
|
111
|
+ public BigDecimal getVip1Price() {
|
|
|
112
|
+ return vip1Price;
|
|
|
113
|
+ }
|
|
|
114
|
+
|
|
|
115
|
+ public void setVip1Price(BigDecimal vip1Price) {
|
|
|
116
|
+ this.vip1Price = vip1Price;
|
|
|
117
|
+ }
|
|
|
118
|
+
|
|
|
119
|
+ public BigDecimal getVip2Price() {
|
|
|
120
|
+ return vip2Price;
|
|
|
121
|
+ }
|
|
|
122
|
+
|
|
|
123
|
+ public void setVip2Price(BigDecimal vip2Price) {
|
|
|
124
|
+ this.vip2Price = vip2Price;
|
|
|
125
|
+ }
|
|
|
126
|
+
|
|
|
127
|
+ public BigDecimal getVip3Price() {
|
|
|
128
|
+ return vip3Price;
|
|
|
129
|
+ }
|
|
|
130
|
+
|
|
|
131
|
+ public void setVip3Price(BigDecimal vip3Price) {
|
|
|
132
|
+ this.vip3Price = vip3Price;
|
|
|
133
|
+ }
|
|
|
134
|
+
|
|
|
135
|
+ public BigDecimal getStudentPrice() {
|
|
|
136
|
+ return studentPrice;
|
|
|
137
|
+ }
|
|
|
138
|
+
|
|
|
139
|
+ public void setStudentPrice(BigDecimal studentPrice) {
|
|
|
140
|
+ this.studentPrice = studentPrice;
|
|
|
141
|
+ }
|
|
|
142
|
+
|
|
|
143
|
+ public BigDecimal getStudentCoinRate() {
|
|
|
144
|
+ return studentCoinRate;
|
|
|
145
|
+ }
|
|
|
146
|
+
|
|
|
147
|
+ public void setStudentCoinRate(BigDecimal studentCoinRate) {
|
|
|
148
|
+ this.studentCoinRate = studentCoinRate;
|
|
|
149
|
+ }
|
|
|
150
|
+
|
|
|
151
|
+ public String getIsDiscount() {
|
|
|
152
|
+ return isDiscount;
|
|
|
153
|
+ }
|
|
|
154
|
+
|
|
|
155
|
+ public void setIsDiscount(String isDiscount) {
|
|
|
156
|
+ this.isDiscount = isDiscount;
|
|
|
157
|
+ }
|
|
|
158
|
+
|
|
|
159
|
+ public String getSpecialoffer() {
|
|
|
160
|
+ return specialoffer;
|
|
|
161
|
+ }
|
157
|
|
162
|
|
158
|
- public void setIsDiscount(String isDiscount) {
|
|
|
159
|
- this.isDiscount = isDiscount;
|
|
|
160
|
- }
|
163
|
+ public void setSpecialoffer(String specialoffer) {
|
|
|
164
|
+ this.specialoffer = specialoffer;
|
|
|
165
|
+ }
|
161
|
|
166
|
|
162
|
- public String getSpecialoffer() {
|
|
|
163
|
- return specialoffer;
|
|
|
164
|
- }
|
167
|
+ public Long getPromotionDiscountInt() {
|
|
|
168
|
+ return promotionDiscountInt;
|
|
|
169
|
+ }
|
165
|
|
170
|
|
166
|
- public void setSpecialoffer(String specialoffer) {
|
|
|
167
|
- this.specialoffer = specialoffer;
|
|
|
168
|
- }
|
171
|
+ public void setPromotionDiscountInt(Long promotionDiscountInt) {
|
|
|
172
|
+ this.promotionDiscountInt = promotionDiscountInt;
|
|
|
173
|
+ }
|
169
|
|
174
|
|
170
|
- public Long getPromotionDiscountInt() {
|
|
|
171
|
- return promotionDiscountInt;
|
|
|
172
|
- }
|
175
|
+ public BigDecimal getPromotionDiscount() {
|
|
|
176
|
+ return promotionDiscount;
|
|
|
177
|
+ }
|
173
|
|
178
|
|
174
|
- public void setPromotionDiscountInt(Long promotionDiscountInt) {
|
|
|
175
|
- this.promotionDiscountInt = promotionDiscountInt;
|
|
|
176
|
- }
|
179
|
+ public void setPromotionDiscount(BigDecimal promotionDiscount) {
|
|
|
180
|
+ this.promotionDiscount = promotionDiscount;
|
|
|
181
|
+ }
|
177
|
|
182
|
|
178
|
- public BigDecimal getPromotionDiscount() {
|
|
|
179
|
- return promotionDiscount;
|
|
|
180
|
- }
|
183
|
+ public String getIsStudentPrice() {
|
|
|
184
|
+ return isStudentPrice;
|
|
|
185
|
+ }
|
181
|
|
186
|
|
182
|
- public void setPromotionDiscount(BigDecimal promotionDiscount) {
|
|
|
183
|
- this.promotionDiscount = promotionDiscount;
|
|
|
184
|
- }
|
187
|
+ public void setIsStudentPrice(String isStudentPrice) {
|
|
|
188
|
+ this.isStudentPrice = isStudentPrice;
|
|
|
189
|
+ }
|
185
|
|
190
|
|
186
|
- public String getIsStudentPrice() {
|
|
|
187
|
- return isStudentPrice;
|
|
|
188
|
- }
|
191
|
+ public String getIsstudentrebate() {
|
|
|
192
|
+ return isstudentrebate;
|
|
|
193
|
+ }
|
189
|
|
194
|
|
190
|
- public void setIsStudentPrice(String isStudentPrice) {
|
|
|
191
|
- this.isStudentPrice = isStudentPrice;
|
|
|
192
|
- }
|
195
|
+ public void setIsstudentrebate(String isstudentrebate) {
|
|
|
196
|
+ this.isstudentrebate = isstudentrebate;
|
|
|
197
|
+ }
|
193
|
|
198
|
|
194
|
- public String getIsstudentrebate() {
|
|
|
195
|
- return isstudentrebate;
|
|
|
196
|
- }
|
199
|
+ public String getVipLevels() {
|
|
|
200
|
+ return vipLevels;
|
|
|
201
|
+ }
|
197
|
|
202
|
|
198
|
- public void setIsstudentrebate(String isstudentrebate) {
|
|
|
199
|
- this.isstudentrebate = isstudentrebate;
|
|
|
200
|
- }
|
203
|
+ public void setVipLevels(String vipLevels) {
|
|
|
204
|
+ this.vipLevels = vipLevels;
|
|
|
205
|
+ }
|
201
|
|
206
|
|
202
|
- public String getVipLevels() {
|
|
|
203
|
- return vipLevels;
|
|
|
204
|
- }
|
207
|
+ public Integer getUpdateTime() {
|
|
|
208
|
+ return updateTime;
|
|
|
209
|
+ }
|
205
|
|
210
|
|
206
|
- public void setVipLevels(String vipLevels) {
|
|
|
207
|
- this.vipLevels = vipLevels;
|
|
|
208
|
- }
|
211
|
+ public void setUpdateTime(Integer updateTime) {
|
|
|
212
|
+ this.updateTime = updateTime;
|
|
|
213
|
+ }
|
209
|
|
214
|
|
210
|
- public Integer getUpdateTime() {
|
|
|
211
|
- return updateTime;
|
|
|
212
|
- }
|
215
|
+ public BigDecimal getBasicPrice() {
|
|
|
216
|
+ return basicPrice;
|
|
|
217
|
+ }
|
213
|
|
218
|
|
214
|
- public void setUpdateTime(Integer updateTime) {
|
|
|
215
|
- this.updateTime = updateTime;
|
|
|
216
|
- }
|
219
|
+ public void setBasicPrice(BigDecimal basicPrice) {
|
|
|
220
|
+ this.basicPrice = basicPrice;
|
|
|
221
|
+ }
|
217
|
|
222
|
|
218
|
- public BigDecimal getBasicPrice() {
|
|
|
219
|
- return basicPrice;
|
|
|
220
|
- }
|
223
|
+ public Integer getProductVipStatus() {
|
|
|
224
|
+ return productVipStatus;
|
|
|
225
|
+ }
|
221
|
|
226
|
|
222
|
- public void setBasicPrice(BigDecimal basicPrice) {
|
|
|
223
|
- this.basicPrice = basicPrice;
|
|
|
224
|
- }
|
|
|
225
|
-
|
|
|
226
|
- public Integer getProductVipStatus() {
|
|
|
227
|
- return productVipStatus;
|
|
|
228
|
- }
|
|
|
229
|
-
|
|
|
230
|
- public void setProductVipStatus(Integer productVipStatus) {
|
|
|
231
|
- this.productVipStatus = productVipStatus;
|
|
|
232
|
- }
|
227
|
+ public void setProductVipStatus(Integer productVipStatus) {
|
|
|
228
|
+ this.productVipStatus = productVipStatus;
|
|
|
229
|
+ }
|
233
|
|
230
|
|
234
|
} |
231
|
} |