您好!我是岛上程序猿,感谢您阅读本文,欢迎一键三连哦。
开发环境
开发语言:Java
框架:springboot
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql 5.7(一定要5.7版本)
数据库工具:Navicat11
开发软件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
浏览器:谷歌浏览器
项目介绍
伴随着全球信息化发展,行行业业都与计算机技术相衔接,计算机技术普遍运用于各大行业,大学生租房系统便是其中一种。实施计算机系统来管理可以降低大学生租房管理的成本,使整个大学生租房的发展和服务水平有显著提升。
本论文主要面向大学生租房管理中出现的一些常见问题,将其与计算机管理系统结合起来。通过这个系统,用户登录大学生租房系统可以实现首页,房屋信息,房屋评价,公告资讯,个人中心,后台管理,意见反馈等进行相应操作,管理员可以更加方便的管理首页,个人中心,房主管理,用户管理,房屋类型管理,房屋信息管理,预约看房管理,定金留房管理,租赁订单管理,房屋评价管理等内容。计算机管理系统在大学生租房设计中的应用,可以很大程度上提高管理水平,使大学生租房管理获得更好的效果。
但是,这套系统实现的功能只是整个大学生租房管理中的一部分,系统中还存在一些不及之处,需要继续的创新,使其完美。
本大学生租房系统使用简洁的框架结构,专门用于用户浏览首页,房屋信息,房屋评价,公告资讯,个人中心,后台管理,意见反馈等信息,对个人信息进行修改等,以及系统管理员对首页,个人中心,房主管理,用户管理,房屋类型管理,房屋信息管理,预约看房管理,定金留房管理,租赁订单管理,房屋评价管理等的操作。房主对首页,个人中心,房屋信息管理,预约看房管理,定金留房管理,租赁订单管理,房屋评价管理等的操作。系统具有方便性、灵活性、应用性。本大学生租房系统设计使用简洁的框架结构,让管理员,房主和用户登录后的进行相关的操作。
功能介绍
根据大学生租房系统的功能需求,进行系统设计。
前台功能:进入系统可以实现首页,房屋信息,房屋评价,公告资讯,个人中心,后台管理,意见反馈等功能进行操作;
后台主要是管理员,房主和用户,主要功能包括首页,个人中心,房主管理,用户管理,房屋类型管理,房屋信息管理,预约看房管理,定金留房管理,租赁订单管理,房屋评价管理等。
这个系统的功能结构设计如图所示。
![](https://img-blog.csdnimg.cn/img_convert/8b5f193bd6064ef68ae7cfe571e9f2a4.png)
系统功能模块图
效果图
![](https://img-blog.csdnimg.cn/img_convert/c991f85c8f1b40b1b3fa76282262fb1b.png)
![](https://img-blog.csdnimg.cn/img_convert/8e6325476d13485a831e4ec939f542a8.png)
![](https://img-blog.csdnimg.cn/img_convert/a13798890d2443ab911608aae71e461e.png)
![](https://img-blog.csdnimg.cn/img_convert/6ed9581fe1fe418d9824c965a8c93c38.png)
![](https://img-blog.csdnimg.cn/img_convert/338afd24581b4776a21c7dd65ce86cff.png)
![](https://img-blog.csdnimg.cn/img_convert/c4ed08aecefa45a28a6fb436b907598c.png)
目录
1 绪论 1
1.1课题背景 1
1.2课题研究现状 1
1.3初步设计方法与实施方案 2
1.4本文研究内容 2
2 系统开发环境 4
2.1 JAVA简介 4
2.2MyEclipse环境配置 4
2.3 B/S结构简介 4
2.4MySQL数据库 5
2.5 SPRINGBOOT框架 5
3 系统分析 6
3.1系统可行性分析 6
3.1.1经济可行性 6
3.1.2技术可行性 6
3.1.3运行可行性 6
3.2系统现状分析 6
3.3功能需求分析 7
3.4系统设计规则与运行环境 8
3.5系统流程分析 8
3.5.1操作流程 8
3.5.2添加信息流程 9
3.5.3删除信息流程 10
4 系统设计 11
4.1系统设计主要功能 11
4.2数据库设计 11
4.2.1数据库设计规范 11
4.2.2 E/R图 11
4.2.3数据表 12
5 系统实现 25
5.1系统功能模块 25
5.2后台模块 27
5.2.1管理员功能模块 27
5.2.2用户功能模块 30
6 系统测试 33
6.1功能测试 33
6.2可用性测试 33
6.3性能测试 34
6.4测试结果分析 34
7结 论 35
参考文献 36
致 谢 37
部分核心代码
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.StoreupEntity;
import com.entity.view.StoreupView;
import com.service.StoreupService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
/**
* 收藏表
* 后端接口
* @author
* @email
* @date 2022-04-10 15:56:44
*/
@RestController
@RequestMapping("/storeup")
public class StoreupController {
@Autowired
private StoreupService storeupService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,StoreupEntity storeup,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,StoreupEntity storeup,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( StoreupEntity storeup){
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
return R.ok().put("data", storeupService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(StoreupEntity storeup){
EntityWrapper< StoreupEntity> ew = new EntityWrapper< StoreupEntity>();
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
StoreupView storeupView = storeupService.selectView(ew);
return R.ok("查询收藏表成功").put("data", storeupView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
StoreupEntity storeup = storeupService.selectById(id);
return R.ok().put("data", storeup);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
StoreupEntity storeup = storeupService.selectById(id);
return R.ok().put("data", storeup);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody StoreupEntity storeup, HttpServletRequest request){
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(storeup);
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
storeupService.insert(storeup);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody StoreupEntity storeup, HttpServletRequest request){
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(storeup);
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
storeupService.insert(storeup);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody StoreupEntity storeup, HttpServletRequest request){
//ValidatorUtils.validateEntity(storeup);
storeupService.updateById(storeup);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
storeupService.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<StoreupEntity> wrapper = new EntityWrapper<StoreupEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
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);
}
}
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.FangwupingjiaEntity;
import com.entity.view.FangwupingjiaView;
import com.service.FangwupingjiaService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
import com.service.StoreupService;
import com.entity.StoreupEntity;
/**
* 房屋评价
* 后端接口
* @author
* @email
* @date 2022-04-10 15:56:44
*/
@RestController
@RequestMapping("/fangwupingjia")
public class FangwupingjiaController {
@Autowired
private FangwupingjiaService fangwupingjiaService;
@Autowired
private StoreupService storeupService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,FangwupingjiaEntity fangwupingjia,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("fangzhu")) {
fangwupingjia.setFangzhuzhanghao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("yonghu")) {
fangwupingjia.setYonghuming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<FangwupingjiaEntity> ew = new EntityWrapper<FangwupingjiaEntity>();
PageUtils page = fangwupingjiaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwupingjia), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,FangwupingjiaEntity fangwupingjia,
HttpServletRequest request){
EntityWrapper<FangwupingjiaEntity> ew = new EntityWrapper<FangwupingjiaEntity>();
PageUtils page = fangwupingjiaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwupingjia), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( FangwupingjiaEntity fangwupingjia){
EntityWrapper<FangwupingjiaEntity> ew = new EntityWrapper<FangwupingjiaEntity>();
ew.allEq(MPUtil.allEQMapPre( fangwupingjia, "fangwupingjia"));
return R.ok().put("data", fangwupingjiaService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(FangwupingjiaEntity fangwupingjia){
EntityWrapper< FangwupingjiaEntity> ew = new EntityWrapper< FangwupingjiaEntity>();
ew.allEq(MPUtil.allEQMapPre( fangwupingjia, "fangwupingjia"));
FangwupingjiaView fangwupingjiaView = fangwupingjiaService.selectView(ew);
return R.ok("查询房屋评价成功").put("data", fangwupingjiaView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
FangwupingjiaEntity fangwupingjia = fangwupingjiaService.selectById(id);
return R.ok().put("data", fangwupingjia);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
FangwupingjiaEntity fangwupingjia = fangwupingjiaService.selectById(id);
return R.ok().put("data", fangwupingjia);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody FangwupingjiaEntity fangwupingjia, HttpServletRequest request){
fangwupingjia.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(fangwupingjia);
fangwupingjiaService.insert(fangwupingjia);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody FangwupingjiaEntity fangwupingjia, HttpServletRequest request){
fangwupingjia.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(fangwupingjia);
fangwupingjiaService.insert(fangwupingjia);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody FangwupingjiaEntity fangwupingjia, HttpServletRequest request){
//ValidatorUtils.validateEntity(fangwupingjia);
fangwupingjiaService.updateById(fangwupingjia);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
fangwupingjiaService.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<FangwupingjiaEntity> wrapper = new EntityWrapper<FangwupingjiaEntity>();
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("fangzhu")) {
wrapper.eq("fangzhuzhanghao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("yonghu")) {
wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
}
int count = fangwupingjiaService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
如需对应的源码,可以评论或者下方联系我,私信都可以。
![](https://img-blog.csdnimg.cn/img_convert/e2f432db172343f79516cc89b5083f1d.png)
![](https://img-blog.csdnimg.cn/img_convert/3c3bcf85ede9415eaef52f1a6467e41c.png)