Detailed design of house rental system based on Java+SpringBoot+vue+element to realize front-end and back-end separation

Introduction:

       2021 is under the background of the rapid development of information technology. Today, the lack of mobile phones and computers has become almost impossible, and it is difficult for people to leave mobile phones and computers in their lives. In view of the increased cost management and operation, it is very necessary for major merchants to establish their own online housing rental platform system, which can not only allow more people to experience the convenience brought by the network, but also help improve housing rental. After decades of rapid development, the Internet has become the most popular and popular medium, and the daily information flow is even comparable to that of the past decade. With its convenient information exchange and fast communication speed, it has quietly changed the consumption patterns of members. Simple, fast and low cost are the characteristics of the Internet. In the Internet, buyers and sellers can conduct various transaction activities without meeting each other. Internet commercialization has become a new trend in the contemporary economy. The concept of "e-commerce" (electronic commerce or e-commerce) was put forward in American academic circles around 1996. After decades in business, the concept has become widely accepted. B2B, C2C, C2B and B2C are the four types of e-commerce, but currently the two are B2B and B2C. Among them, the business-oriented management model is called B2B, which has very strict requirements on the performance, security and service quality of the business system; and the direct-to-consumer model is called B2C, which is also commonly contacted by us. So far, the development of e-commerce is still full of vitality after more than ten years, and e-commerce applications have sprung up like mushrooms after a rain.

        my country has become the second largest economy in the world, with the rapid development of economic strength and the general improvement of people's living standards, so it has also put forward more stringent requirements for housing leasing, such as more appropriate management and more comfortable services. Now we can see more and more housing rentals, huge amount of information, and the rapid development of housing rental platform system, which makes management costs continue to expand. However, the traditional manual statistical methods have many disadvantages: actual time difference, overload, high cost and zero sharing of information. The online housing rental platform system is the Internet service launched by major businesses in order to adapt to the development of the times. With its convenient and efficient services, it reduces the labor intensity of staff and reduces a lot of tedious things.

        The online housing rental platform system designed in this paper is carried out under such objective conditions, and it is a very valuable work that benefits the people and the country. In terms of system management of the house rental platform, the traditional management method obviously cannot be compared with the online house rental platform system, and the online house rental platform system is playing an increasingly important role. The fast speed, large amount of information, security and simplicity of the online housing rental platform system are the advantages that the traditional model cannot match, and are playing an increasingly important role. The online housing rental platform system in this paper is based on MySQL database and Java language.

feature design:

Main function realization : home page, personal center, house type management, house lease management, membership management, order information management, contract information management, check-out evaluation management, administrator management, system management and other basic functions

System structure design: The entire system is composed of multiple functional modules. All functional modules should be listed one by one, and then functional design is carried out one by one, so that each module has a corresponding functional design, and then Overall system design

This house rental platform system chooses B/S structure (Browser/Server, browser/server structure) and two modes based on Web service. It is suitable for operation on the Internet. As long as members can connect to the Internet, the system can be operated and used at any time and anywhere. The working principle of the system is shown in the figure: 

Functional screenshot:

System home page: You can view the home page, house rental, announcement information, personal center, background management, customer service center, etc. on the system home page

Rent rental: Submit the information on the rental page by filling in the house name, type, picture, city, region, location, orientation, floor, building number, facilities, rent, deposit, number of clicks, etc.

Rental Details:

official news:

Personal Center:

Customer Service Management:

order information:

Contract Information:

Backstage administrator: The administrator logs into the house rental platform system to view the home page, personal center, house type management, house rental management, member management, order information management, contract information management, check-out evaluation management, administrator management, system management, etc. information

房屋类型: 在房屋类型管理页面中可以通过填写类型等内容进行修改

房屋租赁:

会员管理: 在会员管理页面中可以查看用户名、密码、姓名、性别、头像、手机、邮箱、身份证等信息,并可根据需要对已有会员管理进行修改或删除等操作

订单管理: 订单信息管理,在订单信息管理页面中可以查看订单编号、房屋名称、类型、图片、位置、朝向、楼层、楼号、租金、押金、总价格、租房日期、租房时长、信息备注、用户名、姓名、手机、身份证等信息,并可根据需要对已有订单信息管理进行修改或删除等详细操作


合同管理: 合同信息管理,在合同信息管理页面中可以查看合同编号、房屋名称、类型、图片、位置、楼号、租金、押金、租房日期、租房时长、合同日期、用户名、姓名、手机、身份证等内容,并且根据需要对已有合同信息管理进行详情,修改或删除等详细操作

系统资讯:


客服轮播图等

数据设计:

将数据库概念设计的E-R图转换为关系数据库。在关系数据库中,数据关系由数据表组成,但是表的结构表现在表的字段上。

表4-1 allusers表

列名 数据类型 长度 约束
id int 11 NOT NULL
username varchar 50  default NULL
pwd varchar 50  default NULL
cx varchar 50  default NULL

表4-2dingdanxinxi表

列名 数据类型 长度 约束
id int 11 NOT NULL
addtime varchar 50 default NULL
dingdanbianhao varchar 50 default NULL
fangwumingcheng varchar 50 default NULL
leixing varchar 50 default NULL
tupian varchar 50 default NULL
weizhi varchar 50 default NULL
chaoxiang varchar 50 default NULL
louceng varchar 50 default NULL
louhao varchar 50 default NULL
zujin varchar 50 default NULL
yajin varchar 50 default NULL
zongjiage varchar 50 default NULL
zufangriqi varchar 50 default NULL
zufangshizhang varchar 50 default NULL
xinxibeizhu varchar 50 default NULL
yonghuming varchar 50 default NULL
xingming varchar 50 default NULL
shouji varchar 50 default NULL
shenfenzheng varchar 50 default NULL
sfsh varchar 50 default NULL
shhf varchar 50 default NULL

表4-3:fangwuleixing表

列名 数据类型 长度 约束
id  int 11 NOT NULL
addtime varchar 50 default NULL
leixing varchar 50 default NULL

Table 4-4: huiyuan table

column name type of data length constraint
id  int 11 NOT NULL
addtime varchar 50 default NULL
yonghuming varchar 50 default NULL
mima varchar 50 default NULL
xingming varchar 50 default NULL
xingbie varchar 50 default NULL
touxiang varchar 50 default NULL
shouji varchar 50 default NULL
youxiang varchar 50 default NULL
shenfenzheng varchar 50 default NULL

Code:


/**
 * 房屋租赁
 * 后端接口
 * @author 
 * @email 
 * @date 2022-01-30 08:44:55
 */
@RestController
@RequestMapping("/fangwuzulin")
public class FangwuzulinController {
    @Autowired
    private FangwuzulinService fangwuzulinService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,FangwuzulinEntity fangwuzulin, HttpServletRequest request){

        EntityWrapper<FangwuzulinEntity> ew = new EntityWrapper<FangwuzulinEntity>();
		PageUtils page = fangwuzulinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwuzulin), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,FangwuzulinEntity fangwuzulin, HttpServletRequest request){
        EntityWrapper<FangwuzulinEntity> ew = new EntityWrapper<FangwuzulinEntity>();
		PageUtils page = fangwuzulinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwuzulin), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( FangwuzulinEntity fangwuzulin){
       	EntityWrapper<FangwuzulinEntity> ew = new EntityWrapper<FangwuzulinEntity>();
      	ew.allEq(MPUtil.allEQMapPre( fangwuzulin, "fangwuzulin")); 
        return R.ok().put("data", fangwuzulinService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(FangwuzulinEntity fangwuzulin){
        EntityWrapper< FangwuzulinEntity> ew = new EntityWrapper< FangwuzulinEntity>();
 		ew.allEq(MPUtil.allEQMapPre( fangwuzulin, "fangwuzulin")); 
		FangwuzulinView fangwuzulinView =  fangwuzulinService.selectView(ew);
		return R.ok("查询房屋租赁成功").put("data", fangwuzulinView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        FangwuzulinEntity fangwuzulin = fangwuzulinService.selectById(id);
		fangwuzulin.setClicknum(fangwuzulin.getClicknum()+1);
		fangwuzulin.setClicktime(new Date());
		fangwuzulinService.updateById(fangwuzulin);
        return R.ok().put("data", fangwuzulin);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        FangwuzulinEntity fangwuzulin = fangwuzulinService.selectById(id);
		fangwuzulin.setClicknum(fangwuzulin.getClicknum()+1);
		fangwuzulin.setClicktime(new Date());
		fangwuzulinService.updateById(fangwuzulin);
        return R.ok().put("data", fangwuzulin);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody FangwuzulinEntity fangwuzulin, HttpServletRequest request){
    	fangwuzulin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(fangwuzulin);

        fangwuzulinService.insert(fangwuzulin);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody FangwuzulinEntity fangwuzulin, HttpServletRequest request){
    	fangwuzulin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(fangwuzulin);

        fangwuzulinService.insert(fangwuzulin);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody FangwuzulinEntity fangwuzulin, HttpServletRequest request){
        //ValidatorUtils.validateEntity(fangwuzulin);
        fangwuzulinService.updateById(fangwuzulin);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        fangwuzulinService.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<FangwuzulinEntity> wrapper = new EntityWrapper<FangwuzulinEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = fangwuzulinService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
	/**
     * 前端智能排序
     */
	@IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,FangwuzulinEntity fangwuzulin, HttpServletRequest request,String pre){
        EntityWrapper<FangwuzulinEntity> ew = new EntityWrapper<FangwuzulinEntity>();
        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();
			String newKey = entry.getKey();
			if (pre.endsWith(".")) {
				newMap.put(pre + newKey, entry.getValue());
			} else if (StringUtils.isEmpty(pre)) {
				newMap.put(newKey, entry.getValue());
			} else {
				newMap.put(pre + "." + newKey, entry.getValue());
			}
		}
		params.put("sort", "clicknum");
        
        params.put("order", "desc");
		PageUtils page = fangwuzulinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwuzulin), params), params));
        return R.ok().put("data", page);
    }


}

复制代码

 Paper references:

Chapter 1 Introduction

1.1 Subject background

1.2 The significance of the project

1.3 Development tools and technologies

1.4 Current situation at home and abroad

Chapter 2 System Analysis

2.1 Feasibility Analysis

2.2 General design principles

2.3 System Requirements Analysis

2.4 Business Process Analysis

2.5 Data Flow Diagram

Chapter 3 System Design

3.1 System function design

3.2 Database Design

Chapter 4 System Implementation

4.1 Front page homepage function module

4.2 Administrator function module

4.3 Member function module

Chapter 5 Software Testing

5.1 The Importance of Software Testing

5.2 Research and selection of test cases

5.3 Test environment and test conditions

5.4 System operation

5.5 Systematic review

Chapter 6 Summary

references:

Thanks

Get the source code:

Like, favorite, follow, comment , check the homepage for contact information

Punch articles updated 251/365 days

Guess you like

Origin juejin.im/post/7082931370539892750