singleobject.java

来自「java web开发技术方案宝典」· Java 代码 · 共 79 行

JAVA
79
字号
package com.yxq.bean;

public class SingleObject {
	private int id;
	private String name;        //商品名称
	private float price;       //商品价格
	private String imgpath;     //商品图片路径
	private int truehave;      //实际库存量(提交定单后,修改的。若用户打来电话请求取消定单,一定要修改库存量)
	private int have;          //临时库存量(放入购物车后,修改的)
	private int buyN;          //购买数量 
	private float buyMoney;    //该商品总价格
	private String message;    //对该商品的提示信息
	
	public SingleObject(){
		name="";
		price=0;
		truehave=0;
		have=0;
		buyN=0;
		buyMoney=0;
		message="";
	}

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getHave() {
		return have;
	}
	public void setHave(int have) {
		this.have = have;
	}
	public float getPrice() {
		return price;
	}
	public void setPrice(float price) {
		this.price = price;
	}	
	public String getImgpath() {
		return imgpath;
	}
	public void setImgpath(String imgpath) {
		this.imgpath = imgpath;
	}
	public int getBuyN() {
		return buyN;
	}
	public void setBuyN(int buyN) {
		this.buyN = buyN;
	}
	public float getBuyMoney() {
		return buyMoney;
	}
	public void setBuyMoney(float buyMoney) {
		this.buyMoney = Math.round(buyMoney*100)/100f;
	}
	public int getTruehave() {
		return truehave;
	}
	public void setTruehave(int truehave) {
		this.truehave = truehave;
	}	
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?