ssm房屋租售网站源码和论文

本文介绍了使用SSM框架(SpringMVC、Spring和MyBatis)构建的房屋租售网站,涉及管理员和用户权限管理,功能包括房源信息管理、新闻发布、留言管理等,旨在提升房屋管理效率和用户体验。

ssm房屋租售网站源码和论文022

 开发工具:idea 
 数据库mysql5.7+
 数据库链接工具:navcat,小海豚等
  技术:ssm 

选题依据(研究的背景、目的和意义等)

随着我国市场经济的快速发展和信息化水平的不断提高,如何利用先进的管理手段,提高管理的水平,是当今社会所面临的一个课题。提高管理水平,必须全方位地提高管理意识。只有高标准、高质量的管理才能满足发展需求。

经济的快速发展,人们对居住的环境要求越来越严格,由于人们对出租出售房要求不同,对房间要求不断提升,所以在这种前提下,一个即方便又快捷的管理方法迫在眉睫,房屋租售网站可以提高用户查找房屋出租出售的效率,减少房屋管理人员的工作难度,对于房屋出租出售、求租求购,要处理和管理的事物烦琐,没有一个好的管理系统是非常麻烦的,费力不讨好。本课件就是针对这种现状而编写的一个可在实际中解决问题的管理系统,重点是对出租出售、求租求购的添加,修改和删除等的管理,同时也可以节省大量的时间和工作量,还可以提高工作效率,对房屋租售相关信息的管理一目了然,在整体上的效率都提高不少,从而在竞争中立与不败之地。

面对信息时代的挑战,利用高科技手段来提高房屋租售信息管理无疑是一条行之有效的途径。在某种意义上,信息与科技在企业管理与现代化建设中显现出越来越重要的地位。房屋租售管理方面的信息化与科学化,已成为现代化生活水平步入高台阶的重要标志。原始的房屋出租出售管理从房屋资料、房屋出租出售等全部采用人工管理方式,此种管理方式,存在很大的问题和局限:管理不规范,效率低,容易出错,资料查询不方便等,而房屋租售网站的出现能够有效解决以上问题。

 

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.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.FangwuchushouEntity;
import com.entity.view.FangwuchushouView;

import com.service.FangwuchushouService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 房屋出售
 * 后端接口
 * @author 
 * @email 
 * @date 2021-02-22 15:20:48
 */
@RestController
@RequestMapping("/fangwuchushou")
public class FangwuchushouController {
    @Autowired
    private FangwuchushouService fangwuchushouService;
    


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

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("fangdong")) {
			fangwuchushou.setFangdonghao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<FangwuchushouEntity> ew = new EntityWrapper<FangwuchushouEntity>();
    	PageUtils page = fangwuchushouService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwuchushou), params), params));
		request.setAttribute("data", page);
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,FangwuchushouEntity fangwuchushou, HttpServletRequest request){
        EntityWrapper<FangwuchushouEntity> ew = new EntityWrapper<FangwuchushouEntity>();
    	PageUtils page = fangwuchushouService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, fangwuchushou), params), params));
		request.setAttribute("data", page);
        return R.ok().put("data", page);
    }

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(FangwuchushouEntity fangwuchushou){
        EntityWrapper< FangwuchushouEntity> ew = new EntityWrapper< FangwuchushouEntity>();
 		ew.allEq(MPUtil.allEQMapPre( fangwuchushou, "fangwuchushou")); 
		FangwuchushouView fangwuchushouView =  fangwuchushouService.selectView(ew);
		return R.ok("查询房屋出售成功").put("data", fangwuchushouView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        FangwuchushouEntity fangwuchushou = fangwuchushouService.selectById(id);
        return R.ok().put("data", fangwuchushou);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        FangwuchushouEntity fangwuchushou = fangwuchushouService.selectById(id);
        return R.ok().put("data", fangwuchushou);
    }
    



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

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

        fangwuchushouService.insert(fangwuchushou);
        return R.ok();
    }

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

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        fangwuchushouService.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<FangwuchushouEntity> wrapper = new EntityWrapper<FangwuchushouEntity>();
		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("fangdong")) {
			wrapper.eq("fangdonghao", (String)request.getSession().getAttribute("username"));
		}

		int count = fangwuchushouService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
	


}

 

主要研究内容

房屋租售网站采用的开发框架为SSM框架,也就是Spring mvc、Spring、MyBatis这三个框架,页面设计用的是jsp技术作为动态页面文件设计,jsp文件里可以对实现html等界面布局的代码,采用SpringMVC替代传统的struts2框架,主要对jsp访问的拦截和控制,Spring作为整个控制的核心,通过控制反转技术和面向切面技术,让Spring自动对使用的类文件进行调用和导入,MyBatis主要作为底层操作数据库,不牵扯业务逻辑,开发工具采用Eclipse,服务器用的是tomcat,数据库是Mysql。

房屋租售网站分为管理员与用户权限。

管理员管理房屋信息,包括房屋出租出售信息以及房屋求租求购信息,管理新闻,管理留言,管理用户等。

用户可以出租出售房屋,求购或购买房屋,租赁房屋,查看新闻,发布留言等。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值