package org.xmx0632.deliciousfruit.api.v1.bo; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.xmx0632.deliciousfruit.api.v1.bo.OrderRequest.Payment.DeliveryPeriod; public class OrderRequest { private String transactionID; // 购物清单 private List<OrderItem> orderList = new ArrayList<OrderItem>(); // 支付信息 private Payment payment; // 送货时间 private DeliveryPeriod deliveryPeriod; // 收货人信息 private OrderRequestReceiver receiverInfo; @Override public String toString() { return "OrderRequest [transactionID=" + transactionID + ", orderList=" + orderList + ", payment=" + payment + ", deliveryPeriod=" + deliveryPeriod + ", receiverInfo=" + receiverInfo + "]"; } public String getTransactionID() { return transactionID; } public void setTransactionID(String transactionID) { this.transactionID = transactionID; } public List<OrderItem> getOrderList() { return orderList; } public void setOrderList(List<OrderItem> orderList) { this.orderList = orderList; } public Payment getPayment() { return payment; } public void setPayment(Payment payment) { this.payment = payment; } public DeliveryPeriod getDeliveryPeriod() { return deliveryPeriod; } public void setDeliveryPeriod(DeliveryPeriod deliveryPeriod) { this.deliveryPeriod = deliveryPeriod; } public OrderRequestReceiver getReceiverInfo() { return receiverInfo; } public void setReceiverInfo(OrderRequestReceiver receiverInfo) { this.receiverInfo = receiverInfo; } public static class OrderItem { private String productId; private int quantity; @Override public String toString() { return "OrderItem [productId=" + productId + ", quantity=" + quantity + "]"; } public String getProductId() { return productId; } public void setProductId(String productId) { this.productId = productId; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } } public static class OrderRequestReceiver extends ReceiverInfo { private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Override public String toString() { return "OrderRequestReceiver [id=" + id + ", toString()=" + super.toString() + ", getCity()=" + getCity() + ", getName()=" + getName() + ", getPhoneNumber()=" + getPhoneNumber() + ", getAddress()=" + getAddress() + ", getProvince()=" + getProvince() + ", getDistrict()=" + getDistrict() + ", getClass()=" + getClass() + ", hashCode()=" + hashCode() + "]"; } } public static class ReceiverInfo { private String name; private String phoneNumber; private String address; private String province; private String city; private String district; @Override public String toString() { return "ReceiverInfo [name=" + name + ", phoneNumber=" + phoneNumber + ", address=" + address + ", province=" + province + ", city=" + city + ", district=" + district + "]"; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getProvince() { return province; } public void setProvince(String province) { this.province = province; } public String getDistrict() { return district; } public void setDistrict(String district) { this.district = district; } } public static class Payment { // 3(货到付现金)/10(货到POS刷卡)/4(银行转账)/11(联华OK卡)/12(Smart卡)/13(东方文化卡) public enum PAYMENT_METHOD { CASH_ON_DELIVERY("3"), CREDIT_CARD_ON_DELIVERY("10"), BANK_TRANSFER("4"), LIANHUA_OK("11"), SMART("12"), EAST_CULTURE("13"); private PAYMENT_METHOD(String code) { this.code = code; } private String code; public String getCode() { return code; } } private String paymentMethod = PAYMENT_METHOD.CASH_ON_DELIVERY .getCode();// 支付方式 private BigDecimal payAmountFromAccount = BigDecimal.ZERO;// 储值账户抵扣金额 private int payPonit = 0;// 积分抵扣 private BigDecimal payAmountFromPonit = BigDecimal.ZERO;// 积分抵扣金额100:1 private List<CashCouponPay> cashCoupons = new ArrayList<CashCouponPay>();// 现金券 private List<GiftCardPay> giftCards = new ArrayList<GiftCardPay>();// 礼品卡 private List<ECouponPay> eCoupon = new ArrayList<ECouponPay>();;// 电子活动券 @Override public String toString() { return "Payment [paymentMethod=" + paymentMethod + ", payAmountFromAccount=" + payAmountFromAccount + ", payPonit=" + payPonit + ", payAmountFromPonit=" + payAmountFromPonit + ", cashCoupons=" + cashCoupons + ", giftCards=" + giftCards + ", eCoupon=" + eCoupon + "]"; } public String getPaymentMethod() { return paymentMethod; } public void setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; } public BigDecimal getPayAmountFromAccount() { return payAmountFromAccount; } public void setPayAmountFromAccount(BigDecimal payAmountFromAccount) { this.payAmountFromAccount = payAmountFromAccount; } public int getPayPonit() { return payPonit; } public void setPayPonit(int payPonit) { this.payPonit = payPonit; } public BigDecimal getPayAmountFromPonit() { return payAmountFromPonit; } public void setPayAmountFromPonit(BigDecimal payAmountFromPonit) { this.payAmountFromPonit = payAmountFromPonit; } public List<CashCouponPay> getCashCoupons() { return cashCoupons; } public void setCashCoupons(List<CashCouponPay> cashCoupons) { this.cashCoupons = cashCoupons; } public List<GiftCardPay> getGiftCards() { return giftCards; } public void setGiftCards(List<GiftCardPay> giftCards) { this.giftCards = giftCards; } public List<ECouponPay> geteCoupon() { return eCoupon; } public void seteCoupon(List<ECouponPay> eCoupon) { this.eCoupon = eCoupon; } public static class CashCouponPay { private String id; private BigDecimal payAmount; public CashCouponPay() { } public CashCouponPay(String id, BigDecimal payAmount) { this.id = id; this.payAmount = payAmount; } @Override public String toString() { return "CashCouponPay [id=" + id + ", payAmount=" + payAmount + "]"; } public String getId() { return id; } public void setId(String id) { this.id = id; } public BigDecimal getPayAmount() { return payAmount; } public void setPayAmount(BigDecimal payAmount) { this.payAmount = payAmount; } } public static class GiftCardPay { private String id; private String password; private BigDecimal payAmount; public GiftCardPay() { } public GiftCardPay(String id, String password, BigDecimal payAmount) { this.id = id; this.password = password; this.payAmount = payAmount; } @Override public String toString() { return "GiftCardPay [id=" + id + ", password=" + password + ", payAmount=" + payAmount + "]"; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public BigDecimal getPayAmount() { return payAmount; } public void setPayAmount(BigDecimal payAmount) { this.payAmount = payAmount; } } public static class ECouponPay { private String id;// “电子活动券编号”:123456 private BigDecimal payAmount;// “抵扣金额”:10 public ECouponPay() { } public ECouponPay(String id, BigDecimal payAmount) { this.id = id; this.payAmount = payAmount; } @Override public String toString() { return "ECouponPay [id=" + id + ", payAmount=" + payAmount + "]"; } public String getId() { return id; } public void setId(String id) { this.id = id; } public BigDecimal getPayAmount() { return payAmount; } public void setPayAmount(BigDecimal payAmount) { this.payAmount = payAmount; } } public static class DeliveryPeriod { private String datePeriod; private String timePeriod; public DeliveryPeriod() { } public DeliveryPeriod(String datePeriod, String timePeriod) { this.datePeriod = datePeriod; this.timePeriod = timePeriod; } @Override public String toString() { return "DeliveryPeriod [datePeriod=" + datePeriod + ", timePeriod=" + timePeriod + "]"; } public String getDatePeriod() { return datePeriod; } public void setDatePeriod(String datePeriod) { this.datePeriod = datePeriod; } public String getTimePeriod() { return timePeriod; } public void setTimePeriod(String timePeriod) { this.timePeriod = timePeriod; } } } }