1、项目介绍
基于SSM的二手房租赁管理系统,该系统采用了B/S模式、MVC设计模式等技术。对二手房租赁涉及的业务需求进行整理,主要涵盖的操作模块有:对于用户管理,房源管理,以及百科知识管理;另外,通过经纪人管理、租房服务管理,搭建房源的共享平台,构建系统统计模块信息等。
管理员角色主要完成用户管理、百科管理、预约管理、房源管理、评论管理、统计分析等操作,基于SSM的二手房租赁管理系统管理员角色用例图如图所示。
用户角色主要完成个人修改、房屋信息查询、租房服务、金牌经纪人查询、百科知识查询等操作,基于SSM的二手房租赁管理系统用户角色用例图如图所示。
2、技术框架
编程语言:Java
系统架构:B/S
Maven项目:是
前端框架:JSP+LayUI
后端框架:SSM(Spring+SpringMVC+Mybatis)
数据库:MySQL
运行环境:JDK8+MySQL5.6+Maven4.5+Idea+Tomcat8.5
3、演示视频
B站地址:https://www.bilibili.com/video/BV1m84y1T7oF
基于SSM的租房管理系统、租赁管理系统、二手房租赁管理系统、房屋出租管理系统、房屋租赁管理系统,附源码+文档+PPT,适合课程设计、毕业设计、实训、大作业、大实
4、项目截图
4.1、普通用户-首页
4.2、普通用户-房源分类
4.3、普通用户-房源详情
4.4、普通用户-金牌经纪人
4.5、普通用户-百科知识
4.6、普通用户-注册
4.7、普通用户-登录
4.8、普通用户-我的资料
4.9、普通用户-账户密码设置
4.10、普通用户-关注房源
4.11、普通用户-预约记录
4.12、普通用户-发布房源
4.13、普通用户-我的房源
4.14、管理员-登录
4.15、管理员-用户管理
4.16、管理员-百科管理
4.17、管理员-预约列表
4.18、管理员-房源列表
4.19、管理员-统计查询
4.20、管理员-我的房源
4.21、管理员-评论列表
5、文档截图
6、安装部署
如果需要帮忙调试安装部署,直接联系作者即可,所有需要的软件都可以帮忙安装,调试要求使用idea,如果不是idea,购买之后无法帮忙调试。
7、代码示例
package com.controller;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import com.dao.MyuserDao;
import com.dao.PinglunDao;
import com.pojo.Myuser;
import com.pojo.MyuserQuery;
import com.pojo.Pinglun;
import com.pojo.PinglunQuery;
import net.sf.json.JSONObject;
@Controller
public class PinglunController {
@Autowired
private PinglunDao pd;
@RequestMapping(value="addfrontpinglun.do")//前台添加评论信息
public String addfrontPinglun(Pinglun pinglun ,HttpServletRequest request){
Myuser user=(Myuser) request.getSession().getAttribute("dangqianyonghu");
if(user==null){
request.setAttribute("message", "<script>alert('超时或未登录请重新登录')</script>");
return "login.jsp";
}
pinglun.setUid(user.getUid());
pinglun.setCreatetime(new Date());
String msg="操作成功";
int result= pd.insertSelective(pinglun);
if(result==0){
msg="操作失败";
}
request.setAttribute("message", "<script>alert(\""+msg+"\")</script>");
return "redirect:toshowFangyuan.do?fid="+pinglun.getFid();
}
/后端处理/
@RequestMapping("back/showPinglun.do")
public String showEmployee( Pinglun pinglun ,HttpServletRequest request){
PinglunQuery mq=new PinglunQuery();
if(pinglun!=null&&pinglun.getContent()!=null&&!"".equals(pinglun.getContent())){
mq.createCriteria().andContentLike("%"+pinglun.getContent()+"%");
}
mq.setPageNo(pinglun.getCurrentPage());
mq.setPageSize(pinglun.getSize());
int count =pd.countByExample(mq); //查询记录数
pinglun.setTotalCount(count); //设置查询出来的总记录条数
List<Pinglun> list= pd.selectByExample(mq);
request.setAttribute("pager",pinglun);
request.setAttribute("list", list);
return "pinglunList.jsp";
}
@RequestMapping(value="back/addPinglun.do",produces="text/html;charset=UTF-8")//添加信息
@ResponseBody
public String addPinglun(Pinglun pinglun ,HttpServletRequest request){
Myuser user=(Myuser) request.getSession().getAttribute("dangqianyonghu");
if(user==null){
JSONObject json=new JSONObject();
json.accumulate("success", "success");
json.accumulate("msg", "登录超时请重新登录");
json.accumulate("url", "login.jsp");
System.out.println("json::"+json.toString());
return json.toString();
}
pinglun.setUid(user.getUid());
pinglun.setCreatetime(new Date());
String msg="操作成功";
int result= pd.insertSelective(pinglun);
if(result==0){
msg="添加失败";
}
JSONObject json=new JSONObject();
json.accumulate("success", "success");
json.accumulate("msg", msg);
System.out.println("json::"+json.toString());
return json.toString();
// return "result.jsp";
}
@RequestMapping(value="back/delPinglun.do",produces="text/html;charset=UTF-8") //删除信息
@ResponseBody
public String delPinglun(Integer[] ids ,HttpServletRequest request){
System.out.println(Arrays.toString(ids));
String msg="操作成功";
if(ids!=null&&ids.length>0){
try{
PinglunQuery gq=new PinglunQuery();
gq.createCriteria().andPidIn(Arrays.asList(ids));
pd.deleteByExample(gq);
}catch(Exception e){
msg="数据存在依赖关系不能删除请删除新增加的信息";
}
}
JSONObject json=new JSONObject();
json.accumulate("success", "success");
json.accumulate("msg", msg);
System.out.println("json::"+json.toString());
return json.toString();
}
@RequestMapping("back/toupdatePinglun.do")
public String showOnePinglun(Integer pid,HttpServletRequest request){
Pinglun g= pd.selectByPrimaryKey(pid);
request.setAttribute("g", g);
return "pinglunUpdate.jsp";
}
@RequestMapping("back/tohuifuPinglun.do")
public String tohuifuPinglun(Integer pid,HttpServletRequest request){
Pinglun g= pd.selectByPrimaryKey(pid);
request.setAttribute("g", g);
return "pinglunHuifu.jsp";
}
@RequestMapping(value="back/updatePinglun.do",produces="text/html;charset=UTF-8")
@ResponseBody
public String updatePinglun(Pinglun pinglun,HttpServletRequest request){
PinglunQuery cq=new PinglunQuery();
cq.createCriteria().andPidEqualTo(pinglun.getPid());
int result= pd.updateByExampleSelective(pinglun, cq);
System.out.println("qqqq");
// return "redirect:showPinglun.do";
//将要被返回到客户端的对象
JSONObject json=new JSONObject();
json.accumulate("success", "success");
json.accumulate("msg", "操作成功");
System.out.println("json::"+json.toString());
return json.toString();
}
}
package com.controller;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import com.dao.BaikeDao;
import com.dao.GuanzhuDao;
import com.dao.MyuserDao;
import com.pojo.Baike;
import com.pojo.BaikeQuery;
import com.pojo.BaikeQuery.Criteria;
import com.pojo.Guanzhu;
import com.pojo.GuanzhuQuery;
import com.pojo.Myuser;
import com.pojo.MyuserQuery;
import net.sf.json.JSONObject;
@Controller
public class GuanZhuController {
@Autowired
private GuanzhuDao gd;
@RequestMapping("showMyguanzhu.do")
public String showguanzhu( Guanzhu guanzhu ,HttpServletRequest request){
Myuser user=(Myuser) request.getSession().getAttribute("dangqianyonghu");
if(user==null){
request.setAttribute("message", "<script>alert('超时或未登录请重新登录')</script>");
return "login.jsp";
}
guanzhu.setUid(user.getUid());
GuanzhuQuery gq=new GuanzhuQuery();
com.pojo.GuanzhuQuery.Criteria qq=gq.createCriteria();
qq.andUidEqualTo(guanzhu.getUid());
List<Guanzhu> list= gd.selectByExample(gq);
request.setAttribute("list", list);
return "guanzhuList.jsp";
}
@RequestMapping(value="guanzhuadd.do")//添加信息
public String addguanzhu(Guanzhu guanzhu ,HttpServletRequest request){
Myuser user=(Myuser) request.getSession().getAttribute("dangqianyonghu");
if(user==null){
request.setAttribute("message", "<script>alert('超时或未登录请重新登录')</script>");
return "login.jsp";
}
guanzhu.setUid(user.getUid());
int result= gd.insertSelective(guanzhu);
request.setAttribute("message", "<script>alert('关注成功');</script>");
return "toshowFangyuan.do?fid="+guanzhu.getFid();
}
@RequestMapping("delGuanzhu.do") //删除信息
public String delguanzhu(Integer gid ,HttpServletRequest request){
String msg="操作成功";
GuanzhuQuery gq=new GuanzhuQuery();
gq.createCriteria().andGidEqualTo(gid);
gd.deleteByExample(gq);
return "showMyguanzhu.do";
}
}