//添加依赖,利用对应的商品初始化订单明细 public OrderDetail(Good good, int goodNum) { this.GoodName = good.Name; this.GoodPrice = good.Price; this.GoodNum = goodNum; }
public OrderDetail(String Id, Good GoodItem, int Num) { this.Id = Id; this.GoodItem = GoodItem; this.Num = Num; }