dto 数据传输对象 在各个层中传输使用
OrderDTO
与订单主表不同之处在于 多一个订单详情的列表属性
main--dto--OrderDTO.java
package com.tkft.sell.dto;
import com.tkft.sell.dataobject.OrderDetail;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Auther xinyuan
* @Date 11/18/18 7:54 PM
**/
@Data
public class OrderDTO {
private String orderId;
private String buyerName;
private String buyerPhone;
private String buyerAddress;
private String buyerOpenid;
private BigDecimal orderAmount;
//订单状态 默认为0 新订单
private Integer orderStatus;
//支付状态 默认为0 未支付
private Integer payStatus;
private Date createTime;
private Date updateTime;
List<OrderDetail> orderDetailList;
}
CartDTO
购物车
package com.tkft.sell.dto;
import lombok.Data;
/**
* 购物车
* @Auther xinyuan
* @Date 11/18/18 7:55 PM
**/
@Data
public class CartDTO {
private String productId;
private Integer productQuantity;
public CartDTO(String productId, Integer productQuantity) {
this.productId = productId;
this.productQuantity = productQuantity;
}
}
网友评论