基于SSH的房屋租赁系统

基于SSH的房屋租赁系统登录注册界面

基于SSH的房屋租赁系统mysql数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '超级管理员账号',
	password varchar(100) comment '超级管理员密码'
) comment '超级管理员';
insert into t_admin(username,password) values('admin','123456');

房屋表创建语句如下:


create table t_fw(
	id int primary key auto_increment comment '主键',
	fzId int comment '房主',
	fwName varchar(100) comment '房屋描述',
	fwbh varchar(100) comment '房屋编号',
	dz varchar(100) comment '地址',
	fx varchar(100) comment '房型',
	dx varchar(100) comment '大小',
	yszj int comment '预设租金',
	pic varchar(100) comment '图片',
	showDate datetime comment '发布日期',
	status varchar(100) comment '状态'
) comment '房屋';

房屋租赁表创建语句如下:


create table t_fwzl(
	id int primary key auto_increment comment '主键',
	fwId int comment '房屋',
	qzrId int comment '求组人',
	ht varchar(100) comment '合同附件',
	beginDate datetime comment '开始时间',
	endDate datetime comment '结束时间',
	zje int comment '总金额',
	remark varchar(100) comment '备注',
	status varchar(100) comment '状态'
) comment '房屋租赁';

房主表创建语句如下:


create table t_fz(
	id int primary key auto_increment comment '主键',
	fzName varchar(100) comment '姓名',
	age varchar(100) comment '年龄',
	sex varchar(100) comment '性别',
	phone varchar(100) comment '电话',
	sfz varchar(100) comment '身份证',
	pic varchar(100) comment '头像'
) comment '房主';

求租人表创建语句如下:


create table t_qzr(
	id int primary key auto_increment comment '主键',
	qzrName varchar(100) comment '姓名',
	age varchar(100) comment '年龄',
	sex varchar(100) comment '性别',
	phone varchar(100) comment '电话',
	sfz varchar(100) comment '身份证',
	pic varchar(100) comment '头像'
) comment '求租人';

员工表创建语句如下:


create table t_yg(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '账号',
	password varchar(100) comment '密码',
	ygName varchar(100) comment '姓名',
	age varchar(100) comment '年龄',
	sex varchar(100) comment '性别',
	phone varchar(100) comment '电话',
	ld varchar(100) comment '领导',
	bm varchar(100) comment '部门'
) comment '员工';

基于SSH的房屋租赁系统oracle数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id integer,
	username varchar(100),
	password varchar(100)
);
insert into t_admin(id,username,password) values(1,'admin','123456');
--超级管理员字段加注释
comment on column t_admin.id is '主键';
comment on column t_admin.username is '超级管理员账号';
comment on column t_admin.password is '超级管理员密码';
--超级管理员表加注释
comment on table t_admin is '超级管理员';

房屋表创建语句如下:


create table t_fw(
	id integer,
	fzId int,
	fwName varchar(100),
	fwbh varchar(100),
	dz varchar(100),
	fx varchar(100),
	dx varchar(100),
	yszj int,
	pic varchar(100),
	showDate datetime,
	status varchar(100)
);
--房屋字段加注释
comment on column t_fw.id is '主键';
comment on column t_fw.fzId is '房主';
comment on column t_fw.fwName is '房屋描述';
comment on column t_fw.fwbh is '房屋编号';
comment on column t_fw.dz is '地址';
comment on column t_fw.fx is '房型';
comment on column t_fw.dx is '大小';
comment on column t_fw.yszj is '预设租金';
comment on column t_fw.pic is '图片';
comment on column t_fw.showDate is '发布日期';
comment on column t_fw.status is '状态';
--房屋表加注释
comment on table t_fw is '房屋';

房屋租赁表创建语句如下:


create table t_fwzl(
	id integer,
	fwId int,
	qzrId int,
	ht varchar(100),
	beginDate datetime,
	endDate datetime,
	zje int,
	remark varchar(100),
	status varchar(100)
);
--房屋租赁字段加注释
comment on column t_fwzl.id is '主键';
comment on column t_fwzl.fwId is '房屋';
comment on column t_fwzl.qzrId is '求组人';
comment on column t_fwzl.ht is '合同附件';
comment on column t_fwzl.beginDate is '开始时间';
comment on column t_fwzl.endDate is '结束时间';
comment on column t_fwzl.zje is '总金额';
comment on column t_fwzl.remark is '备注';
comment on column t_fwzl.status is '状态';
--房屋租赁表加注释
comment on table t_fwzl is '房屋租赁';

房主表创建语句如下:


create table t_fz(
	id integer,
	fzName varchar(100),
	age varchar(100),
	sex varchar(100),
	phone varchar(100),
	sfz varchar(100),
	pic varchar(100)
);
--房主字段加注释
comment on column t_fz.id is '主键';
comment on column t_fz.fzName is '姓名';
comment on column t_fz.age is '年龄';
comment on column t_fz.sex is '性别';
comment on column t_fz.phone is '电话';
comment on column t_fz.sfz is '身份证';
comment on column t_fz.pic is '头像';
--房主表加注释
comment on table t_fz is '房主';

求租人表创建语句如下:


create table t_qzr(
	id integer,
	qzrName varchar(100),
	age varchar(100),
	sex varchar(100),
	phone varchar(100),
	sfz varchar(100),
	pic varchar(100)
);
--求租人字段加注释
comment on column t_qzr.id is '主键';
comment on column t_qzr.qzrName is '姓名';
comment on column t_qzr.age is '年龄';
comment on column t_qzr.sex is '性别';
comment on column t_qzr.phone is '电话';
comment on column t_qzr.sfz is '身份证';
comment on column t_qzr.pic is '头像';
--求租人表加注释
comment on table t_qzr is '求租人';

员工表创建语句如下:


create table t_yg(
	id integer,
	username varchar(100),
	password varchar(100),
	ygName varchar(100),
	age varchar(100),
	sex varchar(100),
	phone varchar(100),
	ld varchar(100),
	bm varchar(100)
);
--员工字段加注释
comment on column t_yg.id is '主键';
comment on column t_yg.username is '账号';
comment on column t_yg.password is '密码';
comment on column t_yg.ygName is '姓名';
comment on column t_yg.age is '年龄';
comment on column t_yg.sex is '性别';
comment on column t_yg.phone is '电话';
comment on column t_yg.ld is '领导';
comment on column t_yg.bm is '部门';
--员工表加注释
comment on table t_yg is '员工';

oracle特有,对应序列如下:


create sequence s_t_fw;
create sequence s_t_fwzl;
create sequence s_t_fz;
create sequence s_t_qzr;
create sequence s_t_yg;

基于SSH的房屋租赁系统sqlserver数据库版本源码:

超级管理员表创建语句如下:


--超级管理员
create table t_admin(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--超级管理员账号
	password varchar(100)--超级管理员密码
);
insert into t_admin(username,password) values('admin','123456');

房屋表创建语句如下:


--房屋表注释
create table t_fw(
	id int identity(1,1) primary key not null,--主键
	fzId int,--房主
	fwName varchar(100),--房屋描述
	fwbh varchar(100),--房屋编号
	dz varchar(100),--地址
	fx varchar(100),--房型
	dx varchar(100),--大小
	yszj int,--预设租金
	pic varchar(100),--图片
	showDate datetime,--发布日期
	status varchar(100)--状态
);

房屋租赁表创建语句如下:


--房屋租赁表注释
create table t_fwzl(
	id int identity(1,1) primary key not null,--主键
	fwId int,--房屋
	qzrId int,--求组人
	ht varchar(100),--合同附件
	beginDate datetime,--开始时间
	endDate datetime,--结束时间
	zje int,--总金额
	remark varchar(100),--备注
	status varchar(100)--状态
);

房主表创建语句如下:


--房主表注释
create table t_fz(
	id int identity(1,1) primary key not null,--主键
	fzName varchar(100),--姓名
	age varchar(100),--年龄
	sex varchar(100),--性别
	phone varchar(100),--电话
	sfz varchar(100),--身份证
	pic varchar(100)--头像
);

求租人表创建语句如下:


--求租人表注释
create table t_qzr(
	id int identity(1,1) primary key not null,--主键
	qzrName varchar(100),--姓名
	age varchar(100),--年龄
	sex varchar(100),--性别
	phone varchar(100),--电话
	sfz varchar(100),--身份证
	pic varchar(100)--头像
);

员工表创建语句如下:


--员工表注释
create table t_yg(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--账号
	password varchar(100),--密码
	ygName varchar(100),--姓名
	age varchar(100),--年龄
	sex varchar(100),--性别
	phone varchar(100),--电话
	ld varchar(100),--领导
	bm varchar(100)--部门
);

基于SSH的房屋租赁系统登录后主页

基于SSH的房屋租赁系统spring+springMVC+hibernate框架对象(javaBean,pojo)设计:

房屋javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//房屋
@Table(name = "t_fw")
public class Fw {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//房主
private Integer fzId;
//房屋描述
private String fwName;
//房屋编号
private String fwbh;
//地址
private String dz;
//房型
private String fx;
//大小
private String dx;
//预设租金
private Integer yszj;
//图片
private String pic;
//发布日期
private Date showDate;
//状态
private String status;
public Integer getFzId() {return fzId;}
public void setFzId(Integer fzId) {this.fzId = fzId;}
public String getFwName() {return fwName;}
public void setFwName(String fwName) {this.fwName = fwName;}
public String getFwbh() {return fwbh;}
public void setFwbh(String fwbh) {this.fwbh = fwbh;}
public String getDz() {return dz;}
public void setDz(String dz) {this.dz = dz;}
public String getFx() {return fx;}
public void setFx(String fx) {this.fx = fx;}
public String getDx() {return dx;}
public void setDx(String dx) {this.dx = dx;}
public Integer getYszj() {return yszj;}
public void setYszj(Integer yszj) {this.yszj = yszj;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
public Date getShowDate() {return showDate;}
public void setShowDate(Date showDate) {this.showDate = showDate;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

房屋租赁javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//房屋租赁
@Table(name = "t_fwzl")
public class Fwzl {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//房屋
private Integer fwId;
//求组人
private Integer qzrId;
//合同附件
private String ht;
//开始时间
private Date beginDate;
//结束时间
private Date endDate;
//总金额
private Integer zje;
//备注
private String remark;
//状态
private String status;
public Integer getFwId() {return fwId;}
public void setFwId(Integer fwId) {this.fwId = fwId;}
public Integer getQzrId() {return qzrId;}
public void setQzrId(Integer qzrId) {this.qzrId = qzrId;}
public String getHt() {return ht;}
public void setHt(String ht) {this.ht = ht;}
public Date getBeginDate() {return beginDate;}
public void setBeginDate(Date beginDate) {this.beginDate = beginDate;}
public Date getEndDate() {return endDate;}
public void setEndDate(Date endDate) {this.endDate = endDate;}
public Integer getZje() {return zje;}
public void setZje(Integer zje) {this.zje = zje;}
public String getRemark() {return remark;}
public void setRemark(String remark) {this.remark = remark;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

房主javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//房主
@Table(name = "t_fz")
public class Fz {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//姓名
private String fzName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//身份证
private String sfz;
//头像
private String pic;
public String getFzName() {return fzName;}
public void setFzName(String fzName) {this.fzName = fzName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getSfz() {return sfz;}
public void setSfz(String sfz) {this.sfz = sfz;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
}

求租人javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//求租人
@Table(name = "t_qzr")
public class Qzr {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//姓名
private String qzrName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//身份证
private String sfz;
//头像
private String pic;
public String getQzrName() {return qzrName;}
public void setQzrName(String qzrName) {this.qzrName = qzrName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getSfz() {return sfz;}
public void setSfz(String sfz) {this.sfz = sfz;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
}

员工javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//员工
@Table(name = "t_yg")
public class Yg {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码
private String password;
//姓名
private String ygName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//领导
private String ld;
//部门
private String bm;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getYgName() {return ygName;}
public void setYgName(String ygName) {this.ygName = ygName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getLd() {return ld;}
public void setLd(String ld) {this.ld = ld;}
public String getBm() {return bm;}
public void setBm(String bm) {this.bm = bm;}
}

基于SSH的房屋租赁系统spring+springMVC+mybatis框架对象(javaBean,pojo)设计:

房屋javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//房屋
public class Fw  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//房主
private Integer fzId;
//房屋描述
private String fwName;
//房屋编号
private String fwbh;
//地址
private String dz;
//房型
private String fx;
//大小
private String dx;
//预设租金
private Integer yszj;
//图片
private String pic;
//发布日期
private Date showDate;
//状态
private String status;
public Integer getFzId() {return fzId;}
public void setFzId(Integer fzId) {this.fzId = fzId;}
public String getFwName() {return fwName;}
public void setFwName(String fwName) {this.fwName = fwName;}
public String getFwbh() {return fwbh;}
public void setFwbh(String fwbh) {this.fwbh = fwbh;}
public String getDz() {return dz;}
public void setDz(String dz) {this.dz = dz;}
public String getFx() {return fx;}
public void setFx(String fx) {this.fx = fx;}
public String getDx() {return dx;}
public void setDx(String dx) {this.dx = dx;}
public Integer getYszj() {return yszj;}
public void setYszj(Integer yszj) {this.yszj = yszj;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
public Date getShowDate() {return showDate;}
public void setShowDate(Date showDate) {this.showDate = showDate;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

房屋租赁javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//房屋租赁
public class Fwzl  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//房屋
private Integer fwId;
//求组人
private Integer qzrId;
//合同附件
private String ht;
//开始时间
private Date beginDate;
//结束时间
private Date endDate;
//总金额
private Integer zje;
//备注
private String remark;
//状态
private String status;
public Integer getFwId() {return fwId;}
public void setFwId(Integer fwId) {this.fwId = fwId;}
public Integer getQzrId() {return qzrId;}
public void setQzrId(Integer qzrId) {this.qzrId = qzrId;}
public String getHt() {return ht;}
public void setHt(String ht) {this.ht = ht;}
public Date getBeginDate() {return beginDate;}
public void setBeginDate(Date beginDate) {this.beginDate = beginDate;}
public Date getEndDate() {return endDate;}
public void setEndDate(Date endDate) {this.endDate = endDate;}
public Integer getZje() {return zje;}
public void setZje(Integer zje) {this.zje = zje;}
public String getRemark() {return remark;}
public void setRemark(String remark) {this.remark = remark;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

房主javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//房主
public class Fz  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//姓名
private String fzName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//身份证
private String sfz;
//头像
private String pic;
public String getFzName() {return fzName;}
public void setFzName(String fzName) {this.fzName = fzName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getSfz() {return sfz;}
public void setSfz(String sfz) {this.sfz = sfz;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
}

求租人javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//求租人
public class Qzr  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//姓名
private String qzrName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//身份证
private String sfz;
//头像
private String pic;
public String getQzrName() {return qzrName;}
public void setQzrName(String qzrName) {this.qzrName = qzrName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getSfz() {return sfz;}
public void setSfz(String sfz) {this.sfz = sfz;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
}

员工javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//员工
public class Yg  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码
private String password;
//姓名
private String ygName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//领导
private String ld;
//部门
private String bm;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getYgName() {return ygName;}
public void setYgName(String ygName) {this.ygName = ygName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getLd() {return ld;}
public void setLd(String ld) {this.ld = ld;}
public String getBm() {return bm;}
public void setBm(String bm) {this.bm = bm;}
}

评论