View Javadoc
1   package org.oxerr.youzan.dto.item;
2   
3   import java.io.Serializable;
4   import java.math.BigDecimal;
5   
6   import org.apache.commons.lang3.StringEscapeUtils;
7   
8   import com.fasterxml.jackson.annotation.JsonProperty;
9   
10  /**
11   * <a href="http://open.youzan.com/structparam?struct=TradeOrder">交易明细数据结构</a>.
12   */
13  public class TradeOrder implements Serializable {
14  
15  	private static final long serialVersionUID = 2016062001L;
16  
17  	/**
18  	 * 商家编码(商家为Sku设置的外部编号)
19  	 */
20  	private String outerSkuId;
21  
22  	/**
23  	 * Sku在系统中的唯一编号,可以在开发者的系统中用作 Sku 的唯一ID,但不能用于调用接口
24  	 */
25  	private String skuUniqueCode;
26  
27  	/**
28  	 * 商品货号(商家为商品设置的外部编号)
29  	 */
30  	private String outerItemId;
31  
32  	/**
33  	 * 商品主图片缩略图地址
34  	 */
35  	private String picThumbPath;
36  
37  	/**
38  	 * 商品类型。
39  	 * <ul>
40  	 * <li>0:普通商品</li>
41  	 * <li>10:分销商品</li>
42  	 * </ul>
43  	 */
44  	private Integer itemType;
45  
46  	/**
47  	 * 商品购买数量
48  	 */
49  	private Long num;
50  
51  	/**
52  	 * 商品数字编号
53  	 */
54  	private Long numIid;
55  
56  	/**
57  	 * Sku的ID,sku_id 在系统里并不是唯一的,结合商品ID一起使用才是唯一的。
58  	 */
59  	private Long skuId;
60  
61  	/**
62  	 * SKU的值,即:商品的规格。如:机身颜色:黑色;手机套餐:官方标配。
63  	 */
64  	private String skuPropertiesName;
65  
66  	/**
67  	 * 商品主图片地址
68  	 */
69  	private String picPath;
70  
71  	/**
72  	 * 交易明细编号。该编号并不唯一,只用于区分交易内的多条明细记录。
73  	 */
74  	private Long oid;
75  
76  	/**
77  	 * 商品标题
78  	 */
79  	private String title;
80  
81  	/**
82  	 * 商品在分销商那边的实付金额。精确到2位小数;单位:元。如果是采购单才有值,否则值为 0。
83  	 */
84  	private BigDecimal fenxiaoPayment;
85  
86  	/**
87  	 * 商品退款状态
88  	 */
89  	private String itemRefundState;
90  
91  	/**
92  	 * 交易明细内的优惠金额。精确到2位小数,单位:元。
93  	 */
94  	private BigDecimal discountFee;
95  
96  	/**
97  	 * 交易明细中的买家留言列表
98  	 */
99  	private TradeBuyerMessage[] buyerMessages;
100 
101 	/**
102 	 * 商品状态
103 	 */
104 	private String stateStr;
105 
106 	/**
107 	 * 交易明细中的优惠信息列表
108 	 */
109 	private TradeOrderPromotion[] orderPromotionDetails;
110 
111 	/**
112 	 * 商品价格。精确到2位小数;单位:元。
113 	 */
114 	private BigDecimal price;
115 
116 	/**
117 	 * 商品在分销商那边的出售价格。精确到2位小数;单位:元。如果是采购单才有值,否则值为 0。
118 	 */
119 	private BigDecimal fenxiaoPrice;
120 
121 	/**
122 	 * 应付金额(商品价格乘以数量的总金额)
123 	 */
124 	private BigDecimal totalFee;
125 
126 	/**
127 	 * 实付金额。精确到2位小数,单位:元。
128 	 */
129 	private BigDecimal payment;
130 
131 	/**
132 	 * 卖家昵称
133 	 */
134 	private String sellerNick;
135 
136 	public TradeOrder() {
137 	}
138 
139 	public TradeOrder(
140 		@JsonProperty("outer_sku_id") String outerSkuId,
141 		@JsonProperty("sku_unique_code") String skuUniqueCode,
142 		@JsonProperty("outer_item_id") String outerItemId,
143 		@JsonProperty("pic_thumb_path") String picThumbPath,
144 		@JsonProperty("item_type") Integer itemType,
145 		@JsonProperty("num") Long num,
146 		@JsonProperty("num_iid") Long numIid,
147 		@JsonProperty("sku_id") Long skuId,
148 		@JsonProperty("sku_properties_name") String skuPropertiesName,
149 		@JsonProperty("pic_path") String picPath,
150 		@JsonProperty("oid") Long oid,
151 		@JsonProperty("title") String title,
152 		@JsonProperty("fenxiao_payment") BigDecimal fenxiaoPayment,
153 		@JsonProperty("item_refund_state") String itemRefundState,
154 		@JsonProperty("discount_fee") BigDecimal discountFee,
155 		@JsonProperty("buyer_messages") TradeBuyerMessage[] buyerMessages,
156 		@JsonProperty("state_str") String stateStr,
157 		@JsonProperty("order_promotion_details") TradeOrderPromotion[] orderPromotionDetails,
158 		@JsonProperty("price") BigDecimal price,
159 		@JsonProperty("fenxiao_price") BigDecimal fenxiaoPrice,
160 		@JsonProperty("total_fee") BigDecimal totalFee,
161 		@JsonProperty("payment") BigDecimal payment,
162 		@JsonProperty("seller_nick") String sellerNick
163 	) {
164 		this.outerSkuId = outerSkuId;
165 		this.skuUniqueCode = skuUniqueCode;
166 		this.outerItemId = outerItemId;
167 		this.picThumbPath = picThumbPath;
168 		this.itemType = itemType;
169 		this.num = num;
170 		this.numIid = numIid;
171 		this.skuId = skuId;
172 		this.skuPropertiesName = skuPropertiesName;
173 		this.picPath = picPath;
174 		this.oid = oid;
175 		this.title = title;
176 		this.fenxiaoPayment = fenxiaoPayment;
177 		this.itemRefundState = itemRefundState;
178 		this.discountFee = discountFee;
179 		this.buyerMessages = buyerMessages;
180 		this.stateStr = stateStr;
181 		this.orderPromotionDetails = orderPromotionDetails;
182 		this.price = price;
183 		this.fenxiaoPrice = fenxiaoPrice;
184 		this.totalFee = totalFee;
185 		this.payment = payment;
186 		this.sellerNick = sellerNick;
187 	}
188 
189 	public String getOuterSkuId() {
190 		return outerSkuId;
191 	}
192 
193 	public void setOuterSkuId(String outerSkuId) {
194 		this.outerSkuId = outerSkuId;
195 	}
196 
197 	public String getSkuUniqueCode() {
198 		return skuUniqueCode;
199 	}
200 
201 	public void setSkuUniqueCode(String skuUniqueCode) {
202 		this.skuUniqueCode = skuUniqueCode;
203 	}
204 
205 	public String getOuterItemId() {
206 		return outerItemId;
207 	}
208 
209 	public void setOuterItemId(String outerItemId) {
210 		this.outerItemId = outerItemId;
211 	}
212 
213 	public String getPicThumbPath() {
214 		return picThumbPath;
215 	}
216 
217 	public void setPicThumbPath(String picThumbPath) {
218 		this.picThumbPath = picThumbPath;
219 	}
220 
221 	public Integer getItemType() {
222 		return itemType;
223 	}
224 
225 	public void setItemType(Integer itemType) {
226 		this.itemType = itemType;
227 	}
228 
229 	public Long getNum() {
230 		return num;
231 	}
232 
233 	public void setNum(Long num) {
234 		this.num = num;
235 	}
236 
237 	public Long getNumIid() {
238 		return numIid;
239 	}
240 
241 	public void setNumIid(Long numIid) {
242 		this.numIid = numIid;
243 	}
244 
245 	public Long getSkuId() {
246 		return skuId;
247 	}
248 
249 	public void setSkuId(Long skuId) {
250 		this.skuId = skuId;
251 	}
252 
253 	public String getSkuPropertiesName() {
254 		return skuPropertiesName;
255 	}
256 
257 	public void setSkuPropertiesName(String skuPropertiesName) {
258 		this.skuPropertiesName = skuPropertiesName;
259 	}
260 
261 	public String getPicPath() {
262 		return picPath;
263 	}
264 
265 	public void setPicPath(String picPath) {
266 		this.picPath = picPath;
267 	}
268 
269 	public Long getOid() {
270 		return oid;
271 	}
272 
273 	public void setOid(Long oid) {
274 		this.oid = oid;
275 	}
276 
277 	public String getTitle() {
278 		return title;
279 	}
280 
281 	public void setTitle(String title) {
282 		this.title = StringEscapeUtils.unescapeHtml4(title);
283 	}
284 
285 	public BigDecimal getFenxiaoPayment() {
286 		return fenxiaoPayment;
287 	}
288 
289 	public void setFenxiaoPayment(BigDecimal fenxiaoPayment) {
290 		this.fenxiaoPayment = fenxiaoPayment;
291 	}
292 
293 	public String getItemRefundState() {
294 		return itemRefundState;
295 	}
296 
297 	public void setItemRefundState(String itemRefundState) {
298 		this.itemRefundState = itemRefundState;
299 	}
300 
301 	public BigDecimal getDiscountFee() {
302 		return discountFee;
303 	}
304 
305 	public void setDiscountFee(BigDecimal discountFee) {
306 		this.discountFee = discountFee;
307 	}
308 
309 	public TradeBuyerMessage[] getBuyerMessages() {
310 		return buyerMessages;
311 	}
312 
313 	public void setBuyerMessages(TradeBuyerMessage[] buyerMessages) {
314 		this.buyerMessages = buyerMessages;
315 	}
316 
317 	public String getStateStr() {
318 		return stateStr;
319 	}
320 
321 	public void setStateStr(String stateStr) {
322 		this.stateStr = stateStr;
323 	}
324 
325 	public TradeOrderPromotion[] getOrderPromotionDetails() {
326 		return orderPromotionDetails;
327 	}
328 
329 	public void setOrderPromotionDetails(
330 			TradeOrderPromotion[] orderPromotionDetails) {
331 		this.orderPromotionDetails = orderPromotionDetails;
332 	}
333 
334 	public BigDecimal getPrice() {
335 		return price;
336 	}
337 
338 	public void setPrice(BigDecimal price) {
339 		this.price = price;
340 	}
341 
342 	public BigDecimal getFenxiaoPrice() {
343 		return fenxiaoPrice;
344 	}
345 
346 	public void setFenxiaoPrice(BigDecimal fenxiaoPrice) {
347 		this.fenxiaoPrice = fenxiaoPrice;
348 	}
349 
350 	public BigDecimal getTotalFee() {
351 		return totalFee;
352 	}
353 
354 	public void setTotalFee(BigDecimal totalFee) {
355 		this.totalFee = totalFee;
356 	}
357 
358 	public BigDecimal getPayment() {
359 		return payment;
360 	}
361 
362 	public void setPayment(BigDecimal payment) {
363 		this.payment = payment;
364 	}
365 
366 	public String getSellerNick() {
367 		return sellerNick;
368 	}
369 
370 	public void setSellerNick(String sellerNick) {
371 		this.sellerNick = sellerNick;
372 	}
373 
374 }