网上商城项目SSM(三)——编写对应数据表的持久化类

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_40788630/article/details/85469315

在项目com.po包中创建六个对应不同数据表的持久化类,

分别是:

Auser.java

package com.po;

/**
 * 与数据表ausertable对应
 */
public class Auser {
	private String aname;
	private String apwd;
	public String getAname() {
		return aname;
	}
	public void setAname(String aname) {
		this.aname = aname;
	}
	public String getApwd() {
		return apwd;
	}
	public void setApwd(String apwd) {
		this.apwd = apwd;
	}
}

buser.java

package com.po;

public class Buser {
	private Integer id;
	private String bemail;
	private String bpwd;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getBemail() {
		return bemail;
	}
	public void setBemail(String bemail) {
		this.bemail = bemail;
	}
	public String getBpwd() {
		return bpwd;
	}
	public void setBpwd(String bpwd) {
		this.bpwd = bpwd;
	}
}

Goods.java

package com.po;
import org.springframework.web.multipart.MultipartFile;
public class Goods {
	private Integer id;
	private String gname;
	private Double goprice;
	private Double grprice;
	private Integer gstore;
	private MultipartFile logoImage;
	private String gpicture;
	private Integer goodstype_id;
	private String typename;//查询时使用
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getGname() {
		return gname;
	}
	public void setGname(String gname) {
		this.gname = gname;
	}
	public Double getGoprice() {
		return goprice;
	}
	public void setGoprice(Double goprice) {
		this.goprice = goprice;
	}
	public Double getGrprice() {
		return grprice;
	}
	public void setGrprice(Double grprice) {
		this.grprice = grprice;
	}
	public Integer getGstore() {
		return gstore;
	}
	public void setGstore(Integer gstore) {
		this.gstore = gstore;
	}
	public MultipartFile getLogoImage() {
		return logoImage;
	}
	public void setLogoImage(MultipartFile logoImage) {
		this.logoImage = logoImage;
	}
	public String getGpicture() {
		return gpicture;
	}
	public void setGpicture(String gpicture) {
		this.gpicture = gpicture;
	}
	public Integer getGoodstype_id() {
		return goodstype_id;
	}
	public void setGoodstype_id(Integer goodstype_id) {
		this.goodstype_id = goodstype_id;
	}
	public String getTypename() {
		return typename;
	}
	public void setTypename(String typename) {
		this.typename = typename;
	}
	
}

GoodsType.java 

package com.po;

public class GoodsType {
    private Integer id;
    private String typename;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getTypename() {
		return typename;
	}
	public void setTypename(String typename) {
		this.typename = typename;
	}
    
}

Notice.java 

package com.po;

public class Notice {
     private Integer id;
     private String ntitle;
     private String ncontent;
     private String ntime;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getNtitle() {
		return ntitle;
	}
	public void setNtitle(String ntitle) {
		this.ntitle = ntitle;
	}
	public String getNcontent() {
		return ncontent;
	}
	public void setNcontent(String ncontent) {
		this.ncontent = ncontent;
	}
	public String getNtime() {
		return ntime;
	}
	public void setNtime(String ntime) {
		this.ntime = ntime;
	}
     
}

Order.java 

package com.po;

public class Order {
	private Integer id;
	private Integer busertable_id;
	private Double amount;
	private Integer status;
	private String orderdate;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getBusertable_id() {
		return busertable_id;
	}
	public void setBusertable_id(Integer busertable_id) {
		this.busertable_id = busertable_id;
	}
	public Double getAmount() {
		return amount;
	}
	public void setAmount(Double amount) {
		this.amount = amount;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getOrderdate() {
		return orderdate;
	}
	public void setOrderdate(String orderdate) {
		this.orderdate = orderdate;
	}
}

猜你喜欢

转载自blog.csdn.net/qq_40788630/article/details/85469315
今日推荐