📄 cartitem.java
字号:
package bo;
import vo.*;
public class CartItem {
private Products product;
private Integer quantity;
private Double itemPrice;
public void setProduct(Products product) {
this.product = product;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
public void setItemPrice(Double itemPrice) {
this.itemPrice = itemPrice;
}
public Products getProduct() {
return product;
}
public Integer getQuantity() {
return quantity;
}
/**
* 小计金额
* @return Double
*/
public Double getItemPrice() {
double price = this.getProduct().getPrice().doubleValue() *
this.getQuantity().intValue();
return new Double(price);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -