🔥作者:雨晨源码🔥
💖简介:java、微信小程序、安卓;定制开发,远程调试 代码讲解,文档指导,ppt制作💖
精彩专栏推荐订阅:在下方专栏👇🏻👇🏻👇🏻👇🏻
Java精彩实战毕设项目案例
小程序精彩项目案例
Python实战项目案例
💕💕文末获取源码
本次文章主要是介绍SpringBoot安家租房管理平台的功能,系统分为3个角色,分别是用户、房东和管理员
安家租房管理平台-系统前言简介
- 随着国内城市化进程的不断发展,农村人口大量涌入城市,聚集居住人口多,由于楼市买房价格昂贵,很多人选择租房方式生活。每年城市人口更新迭代快,人们根据自己就业地点选择租房,房源的租客流动性大,传统的依靠房东或中介张贴广告纸宣传租房,电话预约看房,线下亲自前往看房,耗时耗力,价格不透明,租房交易达成率低,不再适用于信息化时代发展的用户需求,信息化、数字化、系统化的平台才能拥有快速房源租赁宣传通道,看房租房快捷方便,价格公开透明,很受用户欢迎。
- 本课题设计的基于SpringBoot技术安家租房平台,提供线上的房源租赁和管理平台,方便用户使用和房东管理房源。本系统是在Windows环境下,搭建SpringBoot框架,最后利用Java语言编译实现,最后选择MySQL数据库存储,系统划分普通用户、房东、管理员两类角色,权限分区明显。系统最终实现了用户管理模块、房东管理模块、房源管理模块、订单管理模块以及个人信息管理模块。计算机技术运用使得系统存储量大,系统易查询、易维护,保密性好,安全指数高,也便于后期数据查阅与核实,很有发展前景。
- 本课题设计具备整个生命周期,从系统的需求分析,到总体设计,以及数据库的设计和系统的正常运行都严格遵守软件工程的准则,系统最终实现达到预期需求,具有一定的商业价值。
安家租房管理平台-开发技术与环境
- 开发语言:Java
- 后端框架:SpringBoot(spring+springmvc+mybatis)
- 前端:Boostrap、html+css+js
- 数据库:MySQL
- 系统架构:B/S
- 开发工具:jdk1.8、Tomcat8.5(内置)、Navicat,IDEA(Eclipse、MyEclipse )选其一
安家租房管理平台-功能介绍
3个角色:用户、房东以及管理员
用户:登录注册、浏览房源(查看房间视频)、我的订单、预约看房等。
房东:登录注册、房源申请、我的订单、预约处理等。
管理员:订单管理、房东管理、房源管理、用户管理等。
(1)普通用户:拥有注册、登录功能;能浏览房源;看房预约申请;房源申请,个人订单管理;以及个人信息管理。用户用例图如图2-5所示。
(2)房东:拥有注册、登录功能;看房预约处理;房源申请处理;房源管理;订单管理;个人信息管理。房东用例图如图2-6所示。
(3)管理员:拥有系统最高权限,能维护系统所有数据和流程,登录系统后拥有用户管理、房东管理、订单管理、房源管理,以及个人信息管理。管理员用例图如图2-7所示。
安家租房管理平台-演示图片
1.用户端页面:
☀️登录☀️
☀️注册sunny:
☀️浏览房源☀️
☀️我的订单☀️
☀️预约看房☀️
2.房东端页面:
☀️-房源申请☀️
☀️我的订单☀️
☀️预约处理☀️
3.管理员端页面:
☀️订单管理.☀️
☀️房东管理☀️
☀️房源管理☀️
安家租房管理平台-代码展示
1.订单管理【代码如下(示例):】
@RequestMapping("/order.do")//查询全部订单
public String select(Model model){
List<Ordered> orders = orderService.orderList();
model.addAttribute("ordered",orders);
return "order";
}
@RequestMapping("/landlordOrder.do")//查询对应房东订单
public ModelAndView landlordOrder(String l_account){
ModelAndView modelAndView = new ModelAndView();
String landlordName = landlordService.queryLandlordByAccount(l_account).getL_name();//查询账号对应的房东名字
List<Ordered> orders = orderService.landlordOrder(landlordName);//通过房东名字查询相应订单
modelAndView.setViewName("order");
modelAndView.addObject("ordered",orders);
return modelAndView;
}
@RequestMapping("/consumerOrder.do")//查询对应客户订单
public ModelAndView consumerOrder(String u_account, HttpSession session){
ModelAndView modelAndView = new ModelAndView();
Consumer consumer = consumerService.queryConsumerByAccount(u_account);//通过账户名查询到对应用户
session.setAttribute("consumer",consumer);
String consumerName = consumer.getU_name();//查询账号对应的用户名字
List<Ordered> orders = orderService.consumerOrder(consumerName);//通过用户名字查询相应订单
modelAndView.setViewName("order");
modelAndView.addObject("ordered",orders);
return modelAndView;
}
@RequestMapping("/finishOrder.do")//支付订单
public void finishOrder(Integer o_id,String u_account){
orderService.finishOrder(o_id);//改变订单状态
System.out.println(u_account);
String o_hname = orderService.queryOrderById(o_id).getO_hname();//获得房源名称
Integer h_id = houseService.queryHouseByName(o_hname).getH_id();//获取房源ID
String h_owner = houseService.queryHouseByName(o_hname).getH_owner();//获得房源对应房东姓名
String h_lphone = houseService.queryHouseByName(o_hname).getH_lphone();//获得房源对应房东手机号
Landlord landlord = landlordService.queryLandlordByNameAndPhone(h_owner, h_lphone);//找到对应房东
double h_price = houseService.queryHouseByName(o_hname).getH_price();//得到房子价格
Double u_balance = consumerService.queryConsumerByAccount(u_account).getU_balance();//查询目前用户的余额
System.out.println(u_balance);
System.out.println(o_hname);
System.out.println(h_price);
consumerService.payOrder(u_account,h_price);//扣除对应客户的房租
consumerService.returnPledge(u_account);//管理员归还押金
landlordService.getOrderMoney(landlord.getL_account(),h_price);//增加对应房东余额
houseService.updateHouseStatusById(h_id,4);//下架房源
2.预约看房【代码如下(示例):】
@RequestMapping("/landlordAppointment.do")//查询房东对应的预约列表
public ModelAndView landlordAppointment(String l_account){
ModelAndView modelAndView = new ModelAndView();
String landlordName = landlordService.queryLandlordByAccount(l_account).getL_name();//查询账号对应的房东名字
List<Appointment> appointments = appointmentService.landlordAppointment(landlordName);//通过房东名字查询相应预约
modelAndView.setViewName("appointment");
modelAndView.addObject("appointments",appointments);
return modelAndView;
}
@RequestMapping("/consumerAppointment.do")//查询客户对应的预约列表
public ModelAndView consumerAppointment(String u_account){
ModelAndView modelAndView = new ModelAndView();
String consumerName = consumerService.queryConsumerByAccount(u_account).getU_name();//查询账号对应的用户名字
List<Appointment> appointments = appointmentService.consumerAppointment(consumerName);//通过用户名字查询相应预约
modelAndView.setViewName("appointment");
modelAndView.addObject("appointments",appointments);
return modelAndView;
}
@RequestMapping("/acceptAppointment.do")//房东接受预约,改变预约状态
public void acceptAppointment(Integer a_id){
appointmentService.acceptAppointment(a_id);
}
@RequestMapping("/cancelAppointment.do")//客户取消预约,删除此预约
public void cancelAppointment(Integer a_id){appointmentService.cancelAppointment(a_id);}
@RequestMapping("/addAppointment.do")//客户在房源详情页进行预约
public String addAppointment(String account,Integer houseId,String a_site,String time,String a_message){
Timestamp a_time = null;
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date utilDate = format.parse(time);
a_time = new Timestamp(utilDate.getTime());//获得sqlDate格式的时间
} catch (ParseException e) {
e.printStackTrace();
}
Consumer consumer = consumerService.queryConsumerByAccount(account);//根据账号查找到对应客户
String a_uname = consumer.getU_name();//获得客户姓名
String a_uphone = consumer.getU_phone();//获得客户手机号
House house = houseService.queryHouseById(houseId);
String a_house = house.getH_name();//获得房源名称
String a_lname = house.getH_owner();//获得房源对应房东姓名
String a_lphone = house.getH_lphone();
String a_status = "未完成";
appointmentService.addAppointment(a_uname,a_uphone,a_house,a_lname,a_lphone,a_site,a_time,a_message,a_status);
return "redirect:/showHouseById.do?houseId="+houseId;
}
安家租房管理平台-结语(文末获取源码)
💕💕
Java精彩实战毕设项目案例
小程序精彩项目案例
Python实战项目集
💟💟如果大家有任何疑虑,欢迎在下方位置详细交流。