springboot housing rental management system

Using the development tool IDEA, using the springboot rapid development framework, mysql database, it mainly realizes the main functions of user management, housing information management and order management. The project only needs to install the idea development tool and directly import it to run.

House rental information code:

@RequestMapping("/toDetailsPage")
	public String toDetailsPage(int id,HttpServletRequest request) {
		House HouseDetails = service.findHouseDetailsById(id);
		List<String> list = new ArrayList<String>();
		String[] split = HouseDetails.getHouseDetailsImg().split("~");
		for(int i=0;i<split.length;i++) {
			list.add(split[i]);
		}
		request.getSession().setAttribute("Details", HouseDetails);
		request.getSession().setAttribute("DetailsImg", list);
		return "housedetails";
	}
Insert picture description here

House rental information list code:

@RequestMapping("/findUserHouse")
	@ResponseBody
	public UserHouseData houseByUser(HttpServletRequest request, int page, int limit) {
		Page p = new Page();
		Users u = (Users) request.getSession().getAttribute("loginUser");
		String publisher = u.getuNickName();
		p.setPublisher(publisher);
		p.setLimit(limit);
		p.setPage((page - 1) * limit);
		List<House> list = service.findHouseByUser(p);
		System.out.println(list);
		UserHouseData data = new UserHouseData(0, "200", list.size(), list);
		return data;
	}
Insert picture description here


Insert picture description here


Insert picture description here


Insert picture description here


Order management module:

	@RequestMapping("/myOrderInfo")
	@ResponseBody
	public UserOrderData findAllOrder(int page, int limit, HttpServletRequest request){
		Page p = new Page();
		p.setPage((page - 1) * limit);
		p.setLimit(limit);
		Admin u = (Admin) request.getSession().getAttribute("Admin");

		p.setuID(u.getId());
		UserOrderData uod = new UserOrderData();
		List<UserOrder> order = sevice.findAllOrder(p);
		uod.setCode(0);
		uod.setCount(sevice.getOrderCount(u.getId()));
		uod.setData(order);
		uod.setMsg("200");
		return  uod;
	}
Insert picture description here

User login source code:

@RequestMapping("/login")
	@ResponseBody
	public String toCustomerPage(String username,String password,HttpServletRequest req ) {
		Users user = new Users();
		user.setuName(username);
		user.setuPassword(password);
		Users loginUser = mapper.login(user);
		if(loginUser!=null) {
			req.getSession().setAttribute("loginUser", loginUser);
			return "OK";
		}
		return "FAIL";
	}
Insert picture description here

Source code download address: please click 》》》