?? 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; } //添加一個(gè)購物的單項(xiàng),, public double getTotal() { return price * count; } private int productId; private String productName;//加入名字,提高性能,要不然顯示名字,再從數(shù)據(jù)庫中取一次,不好 private int count; private double price; private int cartId;}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -