cartitem.java

来自「基于mysql5.0完成的shopping网站后台」· Java 代码 · 共 69 行

JAVA
69
字号
/* * 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 + =
减小字号Ctrl + -
显示快捷键?