——————————DescriptionStart——————————
运行环境 Java≥8、MySQL≥5.7、Tomcat≥8
开发工具 eclipse/idea/myeclipse/sts等均可配置运行
适用 课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SSM房屋租赁管理系统(java+ssm+layui+mysql+jsp)
一、项目简述
功能包括: 房屋租赁管理系统是一款方便快捷,易操作的租房和各种物业收费的管理系统,该系统官网包含着用户和管理员分类登录,减少了为使用管理员系统的开支,用户分别支持手机网上或电脑网页快捷的查找可出租的房子,并在网上在线支付,并还包含有故障报修,缴租提醒,极大符合现代人们不想出门又快捷办事的需求,管理员也只需在网上提醒用户缴费即可,并有着查看用户信息,查看报障,租金信息,合同信息,日常提醒,添加删除或修改房屋的功能。
二、项目运行 环境配置:
Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)
项目技术:
JSP +Spring + SpringMVC + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等
——————————CodeStart——————————
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 userlist user = userlistService.selectUserCall((String) session.getAttribute("user" )); PageHelper.startPage(pn, 8 ); if (str.equals("我要报障" )) { List<userlist> leaseuser = userlistService.selectUserNameWith(user.getUsername()); PageInfo<userlist> pageInfo = new PageInfo<userlist>(leaseuser, 3 ); return Msg.success().add("pageInfo" , pageInfo); } List<fault> list = faultService.queryAllState(str, user.getUsername()); PageInfo<fault> pageInfo = new PageInfo<fault>(list, 3 ); return Msg.success().add("pageInfo" , pageInfo); } @RequestMapping("/contentofthereport") public ModelAndView contentofthereport (String date, String housecall, String contentofthe,String token,HttpServletRequest request,HttpSession session) throws ParseException { ModelAndView mav = new ModelAndView("personacenter" ); if (!new Koken().kokenid(request, session)) { return mav; } userlist user = userlistService.selectUserCallWith(housecall); fault fault = new fault(); fault.setFhouseid(housecall); fault.setFhouseaddress(user.getLeaseinformation().getHouseaddress()); fault.setFprice(Double.parseDouble(user.getLeaseinformation().getHousemoney())); SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日" ); Date t1 = sdf.parse(date); fault.setFdate(t1); fault.setFdatetemp(date); fault.setFcontent(contentofthe); fault.setFusername(user.getUsername()); fault.setFuserid(user.getUserid()); fault.setFuserphone(user.getUserphone()); fault.setFstate("未处理" ); Warning news = faultService.insert(fault); System.out.println(news.getWarningContent()); mav.addObject("news" , news); return mav; }
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 @RequestMapping("/updatehouse") public String updatehouse (Integer houseid, String housetype, String address, String area, String rent, String state, HttpServletRequest request) { leaseinformation house = leaseinformationService.queryID(houseid).get(0 ); request.removeAttribute("uphouse" ); house.setHouseaddress(address); house.setHousemoney(rent); house.setHousetype(housetype); house.setHousesize(Double.valueOf(area)); house.setHousestate(state); house.setHouseid(houseid); leaseinformationService.updateByPrimaryKey(house); request.setAttribute("sessce" , "修改成功" ); request.setAttribute("newhouse" , house); return "houseupdate" ; } @RequestMapping("/delethouse") public String delethouse (int houseid, HttpServletRequest request) { if (houseid >= 0 ) { int id = leaseinformationService.queryID(houseid).get(0 ).getId(); leaseinformationService.deleteByPrimaryKey(houseid); leaseimgService.deleteByPrimaryKey(id); } return "redirect:pagingselecthouse.do" ; } @RequestMapping("/recommendlist") public String recommendlist (Model model, @RequestParam(value = "pn", defaultValue = "1") Integer pn, @RequestParam(required = false, defaultValue = "6") Integer pageSize) { PageHelper.startPage(pn, 10 ); List<leaseinformation> leaseinformation = leaseinformationService.selectAllLeasable(); PageInfo<leaseinformation> p = new PageInfo<leaseinformation>(leaseinformation, 3 ); model.addAttribute("p" , p); return "recommendhouse" ;
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 @Controller @RequestMapping("/leaseinformationmvc") public class LeaseinformationController { @Autowired LeaseinformationService leaseinformationService; @RequestMapping("/details") public ModelAndView listCategory (@RequestParam int id) { ModelAndView mav = new ModelAndView("details" ); List<leaseinformation> cs= leaseinformationService.allANDimg1(id); for (leaseinformation leaseinformation : cs) { System.out.println(leaseinformation.getLeaseimg().getImgroute()); } mav.addObject("cs" , cs); return mav; } } package com.currency;public class Koken {
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("/Adminselectrepairdone") public String selectrepairdone (String state, @RequestParam(value = "pn", defaultValue = "1") Integer pn, Model model) { state = "已处理" ; PageHelper.startPage(pn, 10 ); List<fault> faultdone = faultService.AdminSelectStateAll(state); PageInfo<fault> page = new PageInfo<fault>(faultdone, 3 ); model.addAttribute("p" , page); return "repairdone" ; } @RequestMapping("/adminrepairwait") public String updaterepairwait (Integer id) { fault fault = faultService.selectByPrimaryKey(id); String fhouseid = fault.getFhouseid(); String fhouseaddress = fault.getFhouseaddress(); Double fprice = fault.getFprice(); Date fdate = fault.getFdate(); String fcontent = fault.getFcontent(); String fusername = fault.getFusername(); String fuserid = fault.getFuserid(); String fuserphone = fault.getFuserphone(); String fstate = "已处理" ; fault f = new fault(fhouseid, fhouseaddress, fprice, fdate, fcontent, fusername, fuserid, fuserphone, fstate, id); faultService.updateByPrimaryKey(f); return "redirect:/admin/Adminselectrepairwait.do" ; } @RequestMapping("/adminrepairdone") public String delrepair (Integer id) { faultService.deleteByPrimaryKey(id); return "redirect:/admin/Adminselectrepairdone.do" ; }
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 52 53 54 return Msg.success().add("num" , num); } @RequestMapping("/repairList") @ResponseBody public Msg repairList (@RequestParam(value = "pn") Integer pn, String str, HttpSession session) { userlist user = userlistService.selectUserCall((String) session.getAttribute("user" )); PageHelper.startPage(pn, 8 ); if (str.equals("我要报障" )) { List<userlist> leaseuser = userlistService.selectUserNameWith(user.getUsername()); PageInfo<userlist> pageInfo = new PageInfo<userlist>(leaseuser, 3 ); return Msg.success().add("pageInfo" , pageInfo); } List<fault> list = faultService.queryAllState(str, user.getUsername()); PageInfo<fault> pageInfo = new PageInfo<fault>(list, 3 ); return Msg.success().add("pageInfo" , pageInfo); } @RequestMapping("/contentofthereport") public ModelAndView contentofthereport (String date, String housecall, String contentofthe,String token,HttpServletRequest request,HttpSession session) throws ParseException { ModelAndView mav = new ModelAndView("personacenter" ); if (!new Koken().kokenid(request, session)) { return mav; } userlist user = userlistService.selectUserCallWith(housecall); fault fault = new fault(); fault.setFhouseid(housecall); fault.setFhouseaddress(user.getLeaseinformation().getHouseaddress()); fault.setFprice(Double.parseDouble(user.getLeaseinformation().getHousemoney())); SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日" ); Date t1 = sdf.parse(date); fault.setFdate(t1); fault.setFdatetemp(date); fault.setFcontent(contentofthe); fault.setFusername(user.getUsername()); fault.setFuserid(user.getUserid()); fault.setFuserphone(user.getUserphone()); fault.setFstate("未处理" ); Warning news = faultService.insert(fault); System.out.println(news.getWarningContent());
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 public static String getVerifyCode () { String ch = "1234567890" ; String result = "" ; Random random = new Random(); for (int i = 0 ; i < 4 ; i++) { int index = random.nextInt(ch.length()); char c = ch.charAt(index); result += c; } return result; } public static void main (String[] args) { try { Code.getNum("18775756179" ); } catch (Exception e) { e.printStackTrace(); } } } package com.controller; @Controller @RequestMapping("/leaseinformationmvc") public class LeaseinformationController { @Autowired LeaseinformationService leaseinformationService; @RequestMapping("/details")
——————————PayStart——————————
项目链接: https://javayms.github.io?id=471422312105200iy https://javayms.pages.dev?id=471422312105200iy