——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Node.js≥14
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明








基于javaweb的SpringBoot房屋租赁系统(java+springboot+maven+vue+layui+elementui+mysql)
角色:管理员、用户
管理员:管理员;首页、个人中心、用户管理、房屋类型管理、房屋信息管理、预约看房管理、在线签约管理、租赁评价管理、交流论坛、系统管理等功能
用户:首页、个人中心、预约看房管理、在线签约管理、租赁评价管理、我的收藏管理,前台首页;首页、房屋信息、交流论坛、房屋资讯、个人中心、后台管理、在线客服等功能
后端: SpringBoot+Mybaits
前端:Vue +ElementUI +Layui +HTML+CSS+JS
文档介绍(系统可行性分析、技术可行性、经济可行性、操作可行性、项目设计目标与原则、系统流程分析、架构设计、系统体系结构、数据库实体设计、数据库表设计、系统实现、管理员功能模块、用户管理、房屋类型管理、房屋信息管理、房屋咨询、预约看房管理、在线签约管理、交流论坛、用户功能模块、预约看房管理):
房屋信息列表管理 :
房屋信息介绍:
在线客服:
页面登录页面:
后台管理功能列表(个人中心、用户管理、房屋类型管理、房屋信息管理、房屋信息、预约看房管理、在线签约管理、租赁评价管理、交流论坛、系统管理):
统计报表展示页面:
预约看房管理:
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| if(map.get("remindend")!=null) { wrapper.le(columnName, map.get("remindend")); } if(!request.getSession().getAttribute("role").toString().equals("管理员")) { wrapper.eq("userid", (Long)request.getSession().getAttribute("userId")); }
int count = storeupService.selectCount(wrapper); return R.ok().put("count", count); }
}
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| */ @RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,ChatEntity chat, HttpServletRequest request){ if(!request.getSession().getAttribute("role").toString().equals("管理员")) { chat.setUserid((Long)request.getSession().getAttribute("userId")); } EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>(); PageUtils page = chatService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chat), params), params));
return R.ok().put("data", page); }
@RequestMapping("/list") public R list(@RequestParam Map<String, Object> params,ChatEntity chat, HttpServletRequest request){ if(!request.getSession().getAttribute("role").toString().equals("管理员")) { chat.setUserid((Long)request.getSession().getAttribute("userId")); } EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>(); PageUtils page = chatService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chat), params), params)); return R.ok().put("data", page); }
@RequestMapping("/lists") public R list( ChatEntity chat){ EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>(); ew.allEq(MPUtil.allEQMapPre( chat, "chat")); return R.ok().put("data", chatService.selectListView(ew)); }
@RequestMapping("/query") public R query(ChatEntity chat){ EntityWrapper< ChatEntity> ew = new EntityWrapper< ChatEntity>(); ew.allEq(MPUtil.allEQMapPre( chat, "chat")); ChatView chatView = chatService.selectView(ew); return R.ok("查询在线客服成功").put("data", chatView); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| return R.ok("查询房屋资讯成功").put("data", newsView); }
@RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ NewsEntity news = newsService.selectById(id); return R.ok().put("data", news); }
@IgnoreAuth @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ NewsEntity news = newsService.selectById(id); return R.ok().put("data", news); }
@RequestMapping("/save") public R save(@RequestBody NewsEntity news, HttpServletRequest request){ news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); newsService.insert(news); return R.ok(); }
@RequestMapping("/add") public R add(@RequestBody NewsEntity news, HttpServletRequest request){ news.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); newsService.insert(news);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| public R delete(@RequestBody Long[] ids){ zaixianqianyueService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); }
@RequestMapping("/remind/{columnName}/{type}") public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) { map.put("column", columnName); map.put("type", type); if(type.equals("2")) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar c = Calendar.getInstance(); Date remindStartDate = null; Date remindEndDate = null; if(map.get("remindstart")!=null) { Integer remindStart = Integer.parseInt(map.get("remindstart").toString()); c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart); remindStartDate = c.getTime(); map.put("remindstart", sdf.format(remindStartDate)); } if(map.get("remindend")!=null) { Integer remindEnd = Integer.parseInt(map.get("remindend").toString()); c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindEnd); remindEndDate = c.getTime(); map.put("remindend", sdf.format(remindEndDate)); } } Wrapper<ZaixianqianyueEntity> wrapper = new EntityWrapper<ZaixianqianyueEntity>(); if(map.get("remindstart")!=null) { wrapper.ge(columnName, map.get("remindstart")); } if(map.get("remindend")!=null) { wrapper.le(columnName, map.get("remindend")); }
String tableName = request.getSession().getAttribute("tableName").toString(); if(tableName.equals("yonghu")) { wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username")); }
int count = zaixianqianyueService.selectCount(wrapper); return R.ok().put("count", count); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| @RequestMapping("/news") public class NewsController { @Autowired private NewsService newsService;
@RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,NewsEntity news, HttpServletRequest request){ EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>(); PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params));
return R.ok().put("data", page); }
@IgnoreAuth @RequestMapping("/list") public R list(@RequestParam Map<String, Object> params,NewsEntity news, HttpServletRequest request){ EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>(); PageUtils page = newsService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, news), params), params)); return R.ok().put("data", page); }
@RequestMapping("/lists") public R list( NewsEntity news){ EntityWrapper<NewsEntity> ew = new EntityWrapper<NewsEntity>(); ew.allEq(MPUtil.allEQMapPre( news, "news")); return R.ok().put("data", newsService.selectListView(ew)); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| Date remindEndDate = null; if(map.get("remindstart")!=null) { Integer remindStart = Integer.parseInt(map.get("remindstart").toString()); c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart); remindStartDate = c.getTime(); map.put("remindstart", sdf.format(remindStartDate)); } if(map.get("remindend")!=null) { Integer remindEnd = Integer.parseInt(map.get("remindend").toString()); c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindEnd); remindEndDate = c.getTime(); map.put("remindend", sdf.format(remindEndDate)); } } Wrapper<FangwuxinxiEntity> wrapper = new EntityWrapper<FangwuxinxiEntity>(); if(map.get("remindstart")!=null) { wrapper.ge(columnName, map.get("remindstart")); } if(map.get("remindend")!=null) { wrapper.le(columnName, map.get("remindend")); }
int count = fangwuxinxiService.selectCount(wrapper); return R.ok().put("count", count); }
@IgnoreAuth @RequestMapping("/autoSort") public R autoSort(@RequestParam Map<String, Object> params,FangwuxinxiEntity fangwuxinxi, HttpServletRequest request,String pre){ EntityWrapper<FangwuxinxiEntity> ew = new EntityWrapper<FangwuxinxiEntity>(); Map<String, Object> newMap = new HashMap<String, Object>(); Map<String, Object> param = new HashMap<String, Object>(); Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator(); while (it.hasNext()) { Map.Entry<String, Object> entry = it.next(); String key = entry.getKey();
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=251524180701201ig
https://javayms.pages.dev?id=251524180701201ig