基于javaweb的SSM房屋租赁系统(java+ssm+vue+layui+elementui+js+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8、Node.js≥14

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可

❗没学过node.js的不要搞前后端分离项目

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

161524102608

171524102608

181524102608

191524102608

201524102608

211524102608

221524102608

241524102608

251524102608

基于javaweb的SSM房屋租赁系统(java+ssm+vue+layui+elementui+js+mysql)

项目介绍

系统包含租客、房东、管理员三个角色,分为前后台

房东:

房屋类型管理:添加、修改或删除房屋类型,以满足其租赁需求。

房屋租赁管理:发布租赁信息,查看房屋空置状态,接收并处理租赁请求,与租客签订租赁合同。

订单信息管理:查看租客提交的租赁订单,确认或拒绝订单,并跟踪订单状态。

合同信息管理:创建、查看租赁合同,并确保租客遵守合同条款。

退房评价管理:在租客退房后进行房屋评价,结算相关费用。

公告信息:发布关于房屋、租金或维修等相关信息,通知租客。

客服中心:通过在线客服平台与租客实时沟通,解答问题或解决纠纷。

租客:

房屋租赁管理:浏览租赁信息,提交租赁请求,并等待房东的确认。

会员管理:注册账户,管理个人信息、支付方式及联系方式。

订单信息管理:创建租赁订单,查看订单状态,进行支付操作。

合同信息管理:查看并遵守租赁合同条款。

退房评价管理:在退房前进行房屋清洁和设施检查,参与退房评价。

公告信息:接收房东或管理员发布的公告信息,了解租金、维修等动态。

客服中心:通过在线客服平台与房东或管理员沟通,提出问题或反馈。

管理员:

会员管理:管理房东和租客的账户信息,包括注册信息、权限设置等。

房屋类型管理:审核和管理房屋类型信息。

订单信息管理:查看所有订单,处理异常情况或纠纷。

合同信息管理:审核租赁合同,确保合规性。

退房评价管理:监督退房评价过程,处理相关争议。

管理员管理:添加、修改或删除其他管理员,管理其权限。

公告信息:发布系统公告,通知所有用户。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。

2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;

4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;

6.数据库:MySql 5.7/8.0等版本均可;

技术栈

后端:SSM(Spring+SpringMVC+Mybatis)

前端:Vue+Layui+elementUI+html+javascript

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;

  2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行;

  3. 将项目中config.properties配置文件中的数据库配置改为自己的配置,然后运行;

  4. 运行项目,在浏览器中输入项目地址:

前台页面

http://localhost:8080/ssml53w4/front/index.html

会员账户:会员1 密码:123456

后台登录页面

http://localhost:8080/ssml53w4/admin/dist/index.html

管理员账户:abo 密码:abo

会员账户:会员1 密码:123456

文档结构展示:

首页展示页面:

公告展示页面:

个人中心展示:

 房屋展示:

 后台登录展示:

房屋类型展示:

房屋租赁展示页面:

会员页面展示:

用户管理控制层:

@Controller

public class UserController {

@Autowired

private UserService userService;

@RequestMapping(“/login”)

public String userList() throws Exception{

return “login”;

@RequestMapping(“/logincheck”)

public String login(User user,Model model,HttpSession httpSession) throws Exception{

User user1=userService.login(user);

if(user1!=null){

httpSession.setAttribute(“user”, user1);

if(user1.getType().equals(“zuke”)){

return “zuke/main”;

else{

return “admin/main1”;

}else{

String error=”error”;

model.addAttribute(“error”, error);

return “login”;

@RequestMapping(“/toindex”)

public String toindex(Model model) throws Exception{

return “admin/index”;

合同管理控制层: 

@Controller

@RequestMapping(“/hetong”)

public class HetongController {

@Autowired

private HetongService hetongService;

@Autowired

private HouselistService houselistService;

@Autowired

private ApplyService applyService;

@Autowired

private ZulistService zulistService;

@Autowired

private CheckoutService checkoutService;

//新增合同信息,修改房屋列表的状态,从申请列表中删除,增添到销售列表当中

@RequestMapping(“/inserthetong”)

public String inserthetong(Model model,Hetong hetong){

//新增合同信息

hetongService.inserthetong(hetong);

Hetong hetong1=hetongService.findhetong(hetong.getHouse_id());

//修改房屋列表状态

Houselist houselist=houselistService.findhouseid(hetong1.getHouse_id());

houselist.setStatus(“已销售”);

houselistService.updatehousestatus(houselist);

//添加到销售列表当中

Zulist zulist=new Zulist();

Apply apply=applyService.findbyhouse_id(hetong.getHouse_id());

zulist.setHouse_id(hetong.getHouse_id());

zulist.setUserlist_id(apply.getUserlist_id());

zulist.setContract_id(hetong1.getId());

zulist.setPrice(apply.getPrice());

zulist.setAddress(apply.getAddress());

zulistService.insertzulist(zulist);

//从申请列表中删除

applyService.deletebyhouse_id(hetong1.getHouse_id());

model.addAttribute(“error”, “zusuccess”);

return “redirect:/zulist/findzulist.action”;

@RequestMapping(“/seehetong”)

public String seehetong(String house_id,Model model){

Hetong hetong=hetongService.findhetong(house_id);

model.addAttribute(“hetong”, hetong);

model.addAttribute(“mainPage”, “hetong.jsp”);

return “admin/main1”;

@RequestMapping(“/updatehetong”)

public String updatehetong(String house_id,Model model){

Hetong hetong=hetongService.findhetong(house_id);

model.addAttribute(“hetong”, hetong);

model.addAttribute(“mainPage”, “updatehetong.jsp”);

return “admin/main1”;

@RequestMapping(“/changehetong”)

public String changehetong(Hetong hetong){

hetongService.updatehetong(hetong);

return “redirect:/zulist/findzulist.action”;

//终止合同操作:删除合同,插入退房列表,删除在售列表,删除房屋列表

@RequestMapping(“/deletehetong”)

public String deletehetong(String house_id,Model model){

hetongService.deletehetong(house_id);

Zulist zulist=zulistService.findzulist(house_id);

Checkout checkout=new Checkout();

checkout.setHouse_id(house_id);

checkout.setAddress(zulist.getAddress());

checkout.setStatus(“已退房”);

checkout.setUserlist_id(zulist.getUserlist_id());

checkoutService.insertcheckout(checkout);

houselistService.deletehousebyhouseid(house_id);

zulistService.deletezulist(house_id);

model.addAttribute(“error”, “checkoutsuccess”);

return “redirect:/zulist/findzulist.action”;

@RequestMapping(“/zukeseehetong”)

public String zukeseehetong(String house_id,Model model){

Hetong hetong=hetongService.findhetong(house_id);

model.addAttribute(“hetong”, hetong);

model.addAttribute(“mainPage”, “showhetong.jsp”);

return “zuke/main”;

租赁管理控制层: 

@Controller

@RequestMapping(“/zulist”)

public class ZulistController {

@Autowired

private ZulistService zulistService;

@Autowired

private UserlistService userlistService;

//跳到增添合同的页面

@RequestMapping(“/toaddhetong”)

public String toaddhetong(Model model,String house_id){

Hetong hetong=new Hetong();

hetong.setHouse_id(house_id);

model.addAttribute(“hetong”, hetong);

model.addAttribute(“mainPage”, “addhetong.jsp”);

return “admin/main1”;

//管理员查看所有在售列表

@RequestMapping(“/findzulist”)

public String findzulist(Model model,@RequestParam(required=false,defaultValue=”1”) Integer page,

@RequestParam(required=false,defaultValue=”2”) Integer pageSize) throws Exception{

PageHelper.startPage(page, pageSize);

List zulist=zulistService.findzuuserlist();

PageInfo p=new PageInfo(zulist);

model.addAttribute(“p”, p);

model.addAttribute(“zulist”, zulist);

model.addAttribute(“mainPage”, “zulist.jsp”);

return “admin/main1”;

//查看我的在售列表

@RequestMapping(“/myzulist”)

public String myzulist(Model model,HttpSession httpSession,@RequestParam(required=false,defaultValue=”1”) Integer page,

@RequestParam(required=false,defaultValue=”2”) Integer pageSize) throws Exception{

User user1= (User) httpSession.getAttribute(“user”);

Userlist userlist=userlistService.findhasuserlist(user1.getId());

PageHelper.startPage(page, pageSize);

List list=userlistService.getUserzuList(userlist.getId());

PageInfo p=new PageInfo(list);

model.addAttribute(“userlistzu”, list);

model.addAttribute(“p”, p);

model.addAttribute(“mainPage”, “myzulist.jsp”);

return “zuke/main”;

退房管理控制层:

@Controller

@RequestMapping(“/applyout”)

public class ApplyoutController {

@Autowired

private ZulistService zulistService;

@Autowired

private ApplyoutService applyoutService;

@Autowired

private UserlistService userlistService;

//插入退房信息

@RequestMapping(“/insertapplyout”)

public String insertapplyout(String house_id,Model model){

Zulist zulist=zulistService.findzulist(house_id);

applyoutService.insertapplyout(zulist);

model.addAttribute(“error”, “applysuccess”);

return “redirect:/zulist/myzulist.action”;

//查看退房申请

@RequestMapping(“/findallapplyout”)

public String findallapplyout(Model model ,@RequestParam(required=false,defaultValue=”1”) Integer page,

@RequestParam(required=false,defaultValue=”2”) Integer pageSize){

PageHelper.startPage(page, pageSize);

List applyout=applyoutService.findallapplyout();

PageInfo p=new PageInfo(applyout);

model.addAttribute(“applyout”, applyout);

model.addAttribute(“p”, p);

model.addAttribute(“mainPage”, “applyout.jsp”);

return “admin/main1”;

//管理员拒绝退房申请

@RequestMapping(“/refuseapplyout”)

public String refuseapplyout(Model model,Integer id){

Applyout applyout=new Applyout();

applyout.setId(id);

applyout.setStatus(“已拒绝”);

applyoutService.updateapplyout(applyout);

model.addAttribute(“mainPage”, “applyout.jsp”);

return “redirect:findallapplyout.action”;

//管理员同意退房申请

@RequestMapping(“/agreeapplyout”)

public String agreeapplyout(Model model,Integer id){

applyoutService.agreeapplyout(id);

model.addAttribute(“error”, “applyoutsucess”);

return “redirect:findallapplyout.action”;

//删除申请退房列表

@RequestMapping(“/deleteapplyout”)

public String deleteapplyout(Model model,Integer id){

applyoutService.deleteapplyout(id);

model.addAttribute(“error”, “deletesucess”);

return “redirect:findallapplyout.action”;

//买家查看自己的 退房申请

@RequestMapping(“/getmyapplyout”)

public String getmyapplyout(Model model,HttpSession httpSession,@RequestParam(required=false,defaultValue=”1”) Integer page,

@RequestParam(required=false,defaultValue=”2”) Integer pageSize){

User user1= (User) httpSession.getAttribute(“user”);

Userlist userlist=userlistService.findhasuserlist(user1.getId());

PageHelper.startPage(page, pageSize);

List list=userlistService.getmyapplyout(userlist.getId());

PageInfo p=new PageInfo(list);

model.addAttribute(“userlist”, list);

model.addAttribute(“p”, p);

model.addAttribute(“mainPage”, “myapplyout.jsp”);

return “zuke/main”;


项目链接:
https://javayms.github.io?id=001524522608201od
https://javayms.pages.dev?id=001524522608201od