📄 cartitem.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.shopping.model;/** * * @author ruirui */public class CartItem { public int getCartId() { return cartId; } public void setCartId(int cartId) { this.cartId = cartId; } public int getCount() { return count; } public void setCount(int count) { this.count = count; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public int getProductId() { return productId; } public void setProductId(int productId) { this.productId = productId; } public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } //添加一个购物的单项,, public double getTotal() { return price * count; } private int productId; private String productName;//加入名字,提高性能,要不然显示名字,再从数据库中取一次,不好 private int count; private double price; private int cartId;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -