• 大小: 175KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-22
  • 语言: 其他
  • 标签:

资源简介

北大青鸟spring阶段项目-(青鸟租房网系统)源码,使用SSM

资源截图

代码片段和文件信息

package com.cssl.controller;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.jasper.tagplugins.jstl.core.Out;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;

import com.alibaba.fastjson.JSON;
import com.cssl.pojo.District;
import com.cssl.pojo.House;
import com.cssl.pojo.HouseType;
import com.cssl.pojo.Street;
import com.cssl.pojo.User;
import com.cssl.service.HousesService;
import com.github.pagehelper.PageInfo;

@Controller
public class HousesController {

@Autowired
private HousesService hs;

//查询房屋信息
@RequestMapping(“/select“)
public String houseAll(HttpSession session){
PageInfo page=hs.houseAll(null1);
List listHouseType=hs.houseTypes();
List listDistrict=hs.districts();
session.setAttribute(“listDistrict“ listDistrict);
session.setAttribute(“listHouseType“ listHouseType);
session.setAttribute(“page“ page);
return “SelectAll“;
}

//添加
@RequestMapping(“/addHouse“)
public String addHouse(House houseHttpSession session) {
User user=(User) session.getAttribute(“user“);
house.setUser(user);
int num=hs.addHouse(house);
if (num>0) {
return “forward:/select.action“;
}
return “Release“;
}


//修改传值
@RequestMapping(“/updatechuanzhi“)
public String chuanzhi(int hmidHttpSession session) {
House house=hs.househmid(hmid);
session.setAttribute(“house“ house);
return “Modification“;
}

//修改
@RequestMapping(“/update“)
public String updateHouse(House houseHttpSession session) {
User user=(User) session.getAttribute(“user“);
house.setUser(user);
int num=hs.updateHouse(house);
if (num>0) {
return “forward:/select.action“;
}
return “Modification“;
}

//删除
@RequestMapping(“/delectajax“)
public void deleteHouse(int hmidint indexHttpServletResponse responseHttpSession session) throws IOException {
response.setContentType(“text/html;charset=utf-8“);
PrintWriter out = response.getWriter();
int num=hs.deleteHouse(hmid);
if (num>0) {
PageInfo page=hs.houseAll(nullindex);
String json=JSON.toJSONString(page.getList());
out.print(json);
}else {
out.print(“1“);
}
}

//分页
@RequestMapping(“/pageinfo“)
public String pagehouse(int indexHttpSession session) throws IOException {
PageInfo page=hs.houseAll(nullindex);
session.setAttribute(“page“ page);
return “SelectAll“;
}

//街道的联级查询
@RequestMapping(“/streetajax“)
public void streetAjax(int didHttpServletResponse response) throws IOException {
response.setContentType(“text/html;charset=utf-8“);
PrintWriter out = response.getWriter()

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2650  2018-11-01 10:14  MyHouses2\.classpath

     文件       1270  2018-10-26 17:41  MyHouses2\.project

     文件        567  2018-10-23 17:36  MyHouses2\.settings\.jsdtscope

     文件        109  2018-10-29 19:41  MyHouses2\.settings\org.eclipse.core.resources.prefs

     文件        364  2018-10-23 17:36  MyHouses2\.settings\org.eclipse.jdt.core.prefs

     文件        554  2018-11-01 11:21  MyHouses2\.settings\org.eclipse.wst.common.component

     文件        345  2018-10-23 17:36  MyHouses2\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2018-10-23 17:36  MyHouses2\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2018-10-23 17:36  MyHouses2\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件        458  2018-11-01 09:56  MyHouses2\.springBeans

     文件        223  2018-11-01 11:30  MyHouses2\.springWebflow

     文件       3459  2018-11-01 10:49  MyHouses2\build\classes\beans.xml

     文件       5810  2018-11-07 17:45  MyHouses2\build\classes\com\cssl\controller\HousesController.class

     文件       2359  2018-11-05 14:10  MyHouses2\build\classes\com\cssl\controller\UsersController.class

     文件        673  2018-11-05 15:44  MyHouses2\build\classes\com\cssl\dao\HouseMapper.class

     文件       3544  2018-11-07 18:00  MyHouses2\build\classes\com\cssl\dao\HouseMapper.xml

     文件        268  2018-11-05 14:10  MyHouses2\build\classes\com\cssl\dao\UserMapper.class

     文件        765  2018-10-09 17:34  MyHouses2\build\classes\com\cssl\dao\UserMapper.xml

     文件        930  2018-11-05 15:04  MyHouses2\build\classes\com\cssl\pojo\District.class

     文件       4011  2018-11-05 14:10  MyHouses2\build\classes\com\cssl\pojo\House.class

     文件        939  2018-11-05 14:10  MyHouses2\build\classes\com\cssl\pojo\HouseType.class

     文件       1227  2018-11-05 14:10  MyHouses2\build\classes\com\cssl\pojo\Street.class

     文件       1937  2018-11-05 14:10  MyHouses2\build\classes\com\cssl\pojo\User.class

     文件        715  2018-11-05 15:43  MyHouses2\build\classes\com\cssl\service\HousesService.class

     文件       2769  2018-11-06 17:52  MyHouses2\build\classes\com\cssl\service\impl\HousesServiceImpl.class

     文件       1173  2018-11-05 14:10  MyHouses2\build\classes\com\cssl\service\impl\UsersServiceImpl.class

     文件        276  2018-11-05 14:10  MyHouses2\build\classes\com\cssl\service\UsersService.class

     文件       1840  2018-11-05 14:10  MyHouses2\build\classes\com\cssl\util\MybatisUtil.class

     文件        601  2018-10-09 17:16  MyHouses2\build\classes\log4j.properties

     文件       1110  2018-11-06 17:51  MyHouses2\build\classes\mybatis-config.xml

............此处省略72个文件信息

评论

共有 条评论

相关资源