一、🚀选题背景介绍
📚推荐理由: 计进行房屋租赁工作的管理,不仅能够保证各项信息准确无误、快速输出,同时计算机具有手工管理所无法比拟的优点,例如:检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等。这些优点能够极大地提高物业管理的效率,也是企业的科学化、正规化管理,与世界接轨的重要条件。
二、📝项目功能介绍
基于SpringBootVue房屋租赁系统
角色:管理员、用户、房东
🎩管理员:统计图表展示、个人中心、用户管理、房东管理、房源类型管理、房源信息管理、在线咨询管理、预约信息管理、订单信息管理 交流论坛、轮播图管理
🎩用户:房屋信息推荐、健身商品推荐、登录注册、公告咨询、 交流论坛、分类、查询、收藏、咨询房子、预约看房、租赁房子、评价
🎩房东:修改密码、个人信息修改、房源信息管理、在线咨询管理、预约信息管理、订单信息管理
三、📝项目技术介绍
开发语言:Java后端: SpringBoot+Mybatis-Plus前端:Vue + Vue Router + ELementUI + Axios开发工具:IDEA,Eclipse,Myeclipse都可以。推荐IDEA,vscodeJDK版本:1.8数据库: MySQL8.0版本以上项目管理:MavenNode版本:14
四、📝项目运行截图
1.房屋租赁首页
1.1房屋推荐
1.2房屋信息
1.3房屋咨询、租赁、预约看房
2.房屋租赁后台
2.1后台登录界面
2.2后台管理首页
2.3用户管理
2.4房屋管理
2.5订单管理
3.参考文档
本项目是前后端分离开发,可以学习拓展等等!
🎩如下截图参考文档方便学习
4.代码实现
```java
/*** 房东* 后端接口* @author * @email * @date */
@RestController
@RequestMapping("/fangdong")
public class FangdongController {@Autowiredprivate FangdongService fangdongService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {FangdongEntity u = fangdongService.selectOne(new EntityWrapper<FangdongEntity>().eq("fangdongzhanghao", username));if(u==null || !u.getMima().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(u.getId(), username,"fangdong", "房东" );return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@RequestMapping("/register")public R register(@RequestBody FangdongEntity fangdong){//ValidatorUtils.validateEntity(fangdong);FangdongEntity u = fangdongService.selectOne(new EntityWrapper<FangdongEntity>().eq("fangdongzhanghao", fangdong.getFangdongzhanghao()));if(u!=null) {return R.error("注册用户已存在");}Long uId = new Date().getTime();fangdong.setId(uId);fangdongService.insert(fangdong);return R.ok();}/*** 退出*/@RequestMapping("/logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");FangdongEntity u = fangdongService.selectById(id);return R.ok().put("data", u);}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){FangdongEntity u = fangdongService.selectOne(new EntityWrapper<FangdongEntity>().eq("fangdongzhanghao", username));if(u==null) {return R.error("账号不存在");}u.setMima("123456");fangdongService.updateById(u);return R.ok("密码已重置为:123456");}/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,FangdongEntity fangdong,HttpServletRequest request){EntityWrapper<FangdongEntity> ew = new EntityWrapper<FangdongEntity>();PageUtils page = fangdongService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangdong), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,FangdongEntity fangdong, HttpServletRequest request){EntityWrapper<FangdongEntity> ew = new EntityWrapper<FangdongEntity>();PageUtils page = fangdongService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangdong), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( FangdongEntity fangdong){EntityWrapper<FangdongEntity> ew = new EntityWrapper<FangdongEntity>();ew.allEq(MPUtil.allEQMapPre( fangdong, "fangdong")); return R.ok().put("data", fangdongService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(FangdongEntity fangdong){EntityWrapper< FangdongEntity> ew = new EntityWrapper< FangdongEntity>();ew.allEq(MPUtil.allEQMapPre( fangdong, "fangdong")); FangdongView fangdongView = fangdongService.selectView(ew);return R.ok("查询房东成功").put("data", fangdongView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){FangdongEntity fangdong = fangdongService.selectById(id);return R.ok().put("data", fangdong);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){FangdongEntity fangdong = fangdongService.selectById(id);return R.ok().put("data", fangdong);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody FangdongEntity fangdong, HttpServletRequest request){fangdong.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(fangdong);FangdongEntity u = fangdongService.selectOne(new EntityWrapper<FangdongEntity>().eq("fangdongzhanghao", fangdong.getFangdongzhanghao()));if(u!=null) {return R.error("用户已存在");}fangdong.setId(new Date().getTime());fangdongService.insert(fangdong);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody FangdongEntity fangdong, HttpServletRequest request){fangdong.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(fangdong);FangdongEntity u = fangdongService.selectOne(new EntityWrapper<FangdongEntity>().eq("fangdongzhanghao", fangdong.getFangdongzhanghao()));if(u!=null) {return R.error("用户已存在");}fangdong.setId(new Date().getTime());fangdongService.insert(fangdong);return R.ok();}/*** 修改*/@RequestMapping("/update")@Transactionalpublic R update(@RequestBody FangdongEntity fangdong, HttpServletRequest request){//ValidatorUtils.validateEntity(fangdong);fangdongService.updateById(fangdong);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){fangdongService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
五、📝ER图、数据流图
👇🏻此源码非开源,若需要此源码可扫码添加微信进行咨询!