Java实战之在线租房系统的实现

目录
  • 介绍
  • 效果图
  • 核心代码
    • 用户控制器
    • 管理员控制层
    • 个人中心控制器

介绍

该系统有三个角色,分别是:普通用户、房屋中介、管理员。普通用户的功能:浏览房屋信息、预约看房、和中介聊天、申请成为中介等等。房屋中介的功能:发布房屋信息、和用户聊天、回复预约信息等等。管理员的功能:管理所有用户信息、管理权限信息、管理所有房屋信息、管理所有预约信息等等。

应用技术:SpringBoot + Redis + MySQL + Vue + SpringSecurity + JWT + ElasticSearch + WebSocket + FreeMarker + MyBatis-Plus等等

运行环境:Eclipse/IntelliJ IDEA + MySQL5.7 + Maven3.6.3(项目压缩包中自带) + JDK1.8 + Redis5.0.5(项目压缩包中自带)+ ElasticSearch6.8.0

效果图

核心代码

用户控制器

/**
 * 用户控制器
 *
 * @author yy
 *
 */
@Controller
@RequestMapping("/userlistmvc")
public class UserListController {

	private static final long serialVersionUID = -884689940866074733L;

	@Resource
	private UserlistService userlistService;

	@Resource
	private AdminListService adminListService;

	@Resource
	private HeadPortraitImgService headPortraitImgService;

	@Resource
	private CheckoutapplicationService checkoutapplicationService;

	/**
	 * 登录
	 */
	@RequestMapping("/userpwd")
	public String userpwd(String username, String pwd, String[] identity, HttpServletRequest request) {
		HttpSession session = request.getSession();
		if (username.equals("") || pwd.equals("")) {
			request.setAttribute("erorr", "输入账号密码不能为空!");
			return "login";
		}

		String tempstr = null;

		try {
			if (identity[0].equals("user")) {
				userlist temp = new userlist();
				temp.setUsercall(username);
				temp.setUserpwd(pwd);
				userlist userlist = userlistService.queryAllUserPwd(temp);
				try {
					tempstr = userlist.getUsercall();
					if (tempstr != null) {
						session.setAttribute("user", tempstr);
						headportraitimg headportraitimg = headPortraitImgService.selectheadportrait(tempstr);
						if (headportraitimg.getHeadportraitimgaddress() != null) {
							session.setAttribute("headportraitimg", headportraitimg.getHeadportraitimgaddress());
						}
						return "official";
					}
				} catch (NullPointerException e) {
					if (tempstr == null) {
						request.setAttribute("erorr", "输入账号密码有误!");
						return "login";
					} else {
						return "official";
					}
				}
			}
			if (identity[0].equals("admin")) {
				adminlist temp = new adminlist();
				temp.setAdminname(username);
				temp.setAdminpwd(pwd);
				adminlist adminlist = adminListService.findAllAdminPwd(temp);
				try {
					tempstr = adminlist.getAdminname();
					if (tempstr != null) {
						session.setAttribute("admin", tempstr);
						return "BackgroundHome";
					}
				} catch (NullPointerException e) {
					request.setAttribute("erorr", "输入账号密码有误!");
					return "login";
				}
			}
		} catch (NullPointerException e) {
			request.setAttribute("erorr", "选择登录方式!");
			e.printStackTrace();
			return "login";
		}

		return "login";
	}

	/**
	 * 注册
	 */
	@RequestMapping("/register")
	public String register(String usercall, String userpwd, String userphone, HttpServletRequest request) {
		if (usercall.equals("") || userpwd.equals("") || userphone.equals("")) {
			request.setAttribute("erorr", "输入账号密码不能为空!");
			return "register";
		}
		userlist user = new userlist();
		user.setUsercall(usercall);
		user.setUserphone(userphone);
		user.setUserpwd(userpwd);
		userlistService.insert(user);
		headportraitimg userimg = new headportraitimg();
		userimg.setHeadportraitimgusername(usercall);
		headPortraitImgService.insertuserimg(userimg);
		return "login";
	}

	/**
	 * 获取手机验证码
	 **/
	@RequestMapping("/getcode")
	public void getcode(String userphone, HttpServletResponse response, HttpServletRequest request) {
		response.setCharacterEncoding("UTF-8");
		try {
			HttpSession session = request.getSession();
			String code = "123456";
//			String code = Code.getNum(userphone);
			System.out.println(code);
			session.setAttribute("code", code);

		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	/**
	 * 判断验证码输入后登陆
	 **/
	@RequestMapping("/phonecod")
	public String phonecod(String userphone, String code, HttpServletRequest request) {
		HttpSession session = request.getSession();
		if (userphone.equals("") || code.equals("")) {
			request.setAttribute("erorr", "手机号或者验证码为空!");
			return "login";
		}
		System.out.println(code);
		if (code.equals(session.getAttribute("code"))) {
			userlist user = userlistService.selectUserPhone(userphone);
			if (user != null) {
				String tempstr = null;
				userlist userlist = userlistService.selectUserPhone(userphone);
				tempstr = userlist.getUsercall();
				if (tempstr != null) {
					session.setAttribute("user", tempstr);
					headportraitimg headportraitimg = headPortraitImgService.selectheadportrait(tempstr);
					if (headportraitimg.getHeadportraitimgaddress() != null) {
						session.setAttribute("headportraitimg", headportraitimg.getHeadportraitimgaddress());
					}
					return "official";
				}
			} else {
				request.setAttribute("erorr", "该手机号未注册!");
				return "login";
			}
		} else {
			request.setAttribute("erorr", "验证码错误!");
			return "login";
		}
		return "login";
	}

	/**
	 * 修改密码
	 */
	@RequestMapping("/updatepwd")
	public String updatepwd(String code, String userphone, String userpwd, HttpServletRequest request) {
		if (code.equals("") || userphone.equals("") || userpwd.equals("")) {
			request.setAttribute("erorr", "手机号,验证码,新密码不能为空!");
			return "updatepwd";
		}
		HttpSession session = request.getSession();
		if (code.equals(session.getAttribute("code"))) {
			userlist userlist = userlistService.selectUserPhone(userphone);
			userlist.setUserpwd(userpwd);
			userlistService.updatepwd(userlist);
			return "login";
		}
		return userpwd;
	}

	/**
	 * 注销
	 */
	@RequestMapping("/cancellation")
	public String cancellation(HttpServletRequest request) {
		HttpSession session = request.getSession();
		session.removeAttribute("user");
		System.out.println("注销成功");
		return "official";
	}

	/**
	 * 申请看房
	 */
	@RequestMapping("/apply")
	@ResponseBody
	public ModelAndView apply(HttpSession session, HttpServletRequest request, String housemoney, String housecall,
			String houseaddress,String housesize) {
		ModelAndView mav = new ModelAndView("official");
		//令牌验证
		if(!new Koken().kokenid(request, session)) {
			return mav;
		}
		mav.addObject("news", "official");
		if ((String) session.getAttribute("user") == null) {
			mav.addObject("apply", "请先登录!");
			return mav;
		}
		// 查询所有数据
		userlist user = userlistService.selectUserCall((String) session.getAttribute("user"));
		if (user.getUsername() == null) {// 判断真实姓名是否为空
			mav.addObject("apply", "请绑定真实姓名后再租赁房屋!");
			return mav;
		} else {
			checkoutapplication coa = new checkoutapplication();
			coa.setCoausername(user.getUsername());
			coa.setCoauserid(user.getUserid());
			coa.setCoauserphone(user.getUserphone());
			coa.setCoahouseid(housecall);
			coa.setCoahouseaddress(houseaddress);
			coa.setCoahouseprice(Double.parseDouble(housemoney));
			coa.setCoahousesize(Double.parseDouble(housesize));
			coa.setCoastate("看房申请中");
			String temp=checkoutapplicationService.insertApply(coa);
			mav.addObject("apply", temp);
		}
		return mav;
	}

}

管理员控制层

@Controller
@RequestMapping("/admin")
public class Adminfunctioncontroller {

	@Resource
	private RentwithdrawnService rentwithdrawnService;

	@Resource
	private LeaseinformationService leaseinformationService;

	@Resource
	private CheckoutapplicationService checkoutapplicationService;

	@Resource
	private MydailylifeService mydailylifeService;
	@Resource
	private RentcollectionService rentcollectionService;
	@Resource
	private FaultService faultService;

	@Resource
	private UserlistService userlistService;
	@Resource
	private LeaseimgService leaseimgService;
	@Resource
	private HeadPortraitImgService headPortraitImgService;

	/**
	 * 注销
	 */
	@RequestMapping("/admincancel")
	public String cancellation(HttpServletRequest request) {
		HttpSession session = request.getSession();
		session.removeAttribute("admin");
		System.out.println("注销成功");
		return "official";
	}

	@RequestMapping("/details")
	public ModelAndView listCategory(@RequestParam int pn) {
		ModelAndView mav = new ModelAndView("rentingdel");
		// 设置分页传输
		PageHelper.startPage(pn, 10);
		// 查询所有数据
		List<rentwithdrawn> list = rentwithdrawnService.selectRwState("已退租");
		// 使用PageInFo封装查询结果
		PageInfo<rentwithdrawn> pageInfo = new PageInfo<rentwithdrawn>(list, 5);
		// 放入转发参数
		mav.addObject("cs", pageInfo);
		return mav;
	}

	@RequestMapping("/delect")
	public ModelAndView delect(@RequestParam int id) {
		ModelAndView mav = new ModelAndView("rentingdel");
		rentwithdrawnService.deleteByPrimaryKey(id);
		return mav;
	}

	@RequestMapping("/rentinglist")
	public ModelAndView listHouseState(@RequestParam int pn) {
		ModelAndView mav = new ModelAndView("rentinglist");
		// 设置分页传输
		PageHelper.startPage(pn, 10);
		// 查询所有数据
		List<leaseinformation> list = leaseinformationService.selecthousteaseWith("出租中");
		// 使用PageInFo封装查询结果
		PageInfo<leaseinformation> pageInfo = new PageInfo<leaseinformation>(list, 5);
		// 放入转发参数
		mav.addObject("cs", pageInfo);
		return mav;
	}

	@RequestMapping("/delectcontract")
	public ModelAndView delectcontract(@RequestParam int id) {
		ModelAndView mav = new ModelAndView("rentinglist");
		leaseinformationService.updacontract(id);
		return mav;
	}

	/**
	 * 看房申请列表
	 */
	@RequestMapping("/houseapply")
	public ModelAndView kanfansqing(@RequestParam int pn) {
		ModelAndView mav = new ModelAndView("houseapply");
		// 设置分页传输
		PageHelper.startPage(pn, 10);
		// 查询所有数据
		List<checkoutapplication> list = checkoutapplicationService.selectCoaState();
		// 使用PageInFo封装查询结果
		PageInfo<checkoutapplication> pageInfo = new PageInfo<checkoutapplication>(list, 5);
		// 放入转发参数
		mav.addObject("cs", pageInfo);
		return mav;
	}

	/**
	 * 预约看房申请
	 */
	@RequestMapping("/tonyizp")
	public ModelAndView tonyizp(@RequestParam int id, String housecall, String name) throws ParseException {
		ModelAndView mav = new ModelAndView("houseapply");
		checkoutapplicationService.xgaiCoaState("已同意", id);
		leaseinformation house = leaseinformationService.selectHouseCall(housecall).get(0);
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");// 设置日期格式
		Calendar c = Calendar.getInstance();
		c.add(Calendar.DATE, 30);// 计算30天后的时间
		String t1 = df.format(new Date());
		String t2 = df.format(c.getTime());
		// 格式转换date格式
		Date date1 = df.parse(t1);
		Date date2 = df.parse(t2);
		house.setHousestartingdate(date1);
		house.setHouseclosingdate(date2);
		house.setHousestate("出租中");
		house.setUsername(name);
		leaseinformationService.updateByPrimaryKey(house);
		return mav;
	}

	@RequestMapping("/jujzp")
	public ModelAndView jujzp(@RequestParam int id) {
		ModelAndView mav = new ModelAndView("houseapply");
		checkoutapplicationService.xgaiCoaState("已拒绝", id);
		return mav;
	}

	/**
	 *	退房申请
	 */
	@RequestMapping("/tzshenqing")
	public ModelAndView tzshenqing(@RequestParam int pn) {
		ModelAndView mav = new ModelAndView("housedel");
		// 设置分页传输
		PageHelper.startPage(pn, 10);
		// 查询所有数据
		List<checkoutapplication> list = checkoutapplicationService.selectCoaState1();
		// 使用PageInFo封装查询结果
		PageInfo<checkoutapplication> pageInfo = new PageInfo<checkoutapplication>(list, 5);
		// 放入转发参数
		mav.addObject("cs", pageInfo);
		return mav;
	}

	/**
	 * 删除退房记录
	 */
	@RequestMapping("/delecttzsq")
	public ModelAndView delecttzsq(@RequestParam int id) {
		ModelAndView mav = new ModelAndView("housedel");
		checkoutapplicationService.deleteByPrimaryKey(id);
		return mav;
	}

	/**
	 * 同意退房
	 */
	@RequestMapping("/checkoutmvc")
	public ModelAndView checkoutmvc(@RequestParam int id,String housecall) {
		ModelAndView mav = new ModelAndView("housedel");
		String news=checkoutapplicationService.updateState("已同意", id);
		if(news.equals("同意退租成功!")) {
			System.out.println(news);
			System.out.println(leaseinformationService.updateCancelForeignKey(housecall));
		}
		return mav;
	}

	/**
	 * 拒绝退房
	 */
	@RequestMapping("/refusemvc")
	public ModelAndView refusemvc(@RequestParam int id) {
		ModelAndView mav = new ModelAndView("housedel");
		System.out.println(checkoutapplicationService.updateState("已拒绝", id));
		return mav;
	}

	/**
	 * 分页查找所有用户
	 */
	@RequestMapping("/pagingselectuser")
	public String pagingselectuser(Model model, @RequestParam(value = "pn", defaultValue = "1") Integer pn,
			@RequestParam(required = false, defaultValue = "6") Integer pageSize) {
		PageHelper.startPage(pn, 10);
		List<userlist> userlist = userlistService.selectAll();
		PageInfo<userlist> p = new PageInfo<userlist>(userlist, 3);
		model.addAttribute("p", p);
		return "account";
	}

	/**
	 * 删除用户信息
	 */
	@RequestMapping("/deletuser")
	public String deletuser(int id,String username,HttpServletRequest request) {
		userlistService.updateJointTabledelete(username);
		headPortraitImgService.deletuserimg(userlistService.selectUserId(id).getUsercall());
		userlistService.deleteByPrimaryKey(id);
		return "redirect:pagingselectuser.do";
	}

	/**
	 * 添加房源
	 *
	 * @throws IOException
	 * @throws IllegalStateException
	 */
	@RequestMapping("/addhouse")
	public String addhouse(String housecall, String address, String area, String rent, String housetype, String[] state,
			@RequestParam(value = "file", required = false) MultipartFile file, HttpServletRequest request)
			throws IllegalStateException, IOException {
		if (housecall.equals("") || address.equals("") || area.equals("") || rent.equals("") || state.equals("")
				|| housetype.equals("")) {
			request.setAttribute("erro", "输入房源信息不能缺少任意一项!");
			return "housingadd";
		}
		List<leaseinformation> list = leaseinformationService.queryAll();
		for (leaseinformation leaseinformation : list) {
			if (housecall.equals(leaseinformation.getHousecall())) {
				request.setAttribute("erro", "该房源编号已存在");
				return "housingadd";
			}
		}
		String path = "";
		String imgname = "";
		if (!file.isEmpty()) {
			// 生成uuid作为文件名称
			String uuid = UUID.randomUUID().toString().replaceAll("-", "");
			// 获得文件类型(可以判断如果不是图片,禁止上传)
			String contentType = file.getContentType();
			// 获得文件后缀名称
			String imageName = contentType.substring(contentType.indexOf("/") + 1);
			path = "C://Users/Rain/Desktop/ssm_leaseOfHouses/WebContent/leaseimg/" + uuid + "." + imageName;
			file.transferTo(new File(path));
			imgname = uuid + "." + imageName;
		}
		leaseimg img = new leaseimg();
		img.setImgname(address);
		img.setImgroute(imgname);
		leaseimgService.insert(img);
		int id = leaseimgService.selectAll().get(leaseimgService.selectAll().size() - 1).getId();
		leaseinformation house = new leaseinformation();
		house.setHouseaddress(address);
		house.setHousesize(Double.valueOf(area));
		house.setHousemoney(rent);
		house.setHousestate(state[0]);
		house.setHousecall(housecall);
		//获取当前时间和一个月后的时间
		Date date = new Date();
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
		String HouseStartingDate=sdf.format(date);
		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		cal.add(Calendar.DATE, 30);
		String HouseClosingDate=sdf.format(cal.getTime());
		house.setHousestartingdate(date);
		house.setHouseclosingdate(cal.getTime());
		house.setHousestartingdatetemp(HouseStartingDate);
		house.setHouseclosingdatetemp(HouseClosingDate);
		house.setId(id);
		house.setHousetype(housetype);
		house.setHouserecommend("未设置");
		leaseinformationService.addHouse(house);
		request.setAttribute("sessce", "添加成功");
		return "housingadd";
	}

	/**
	 * 分页展示房源信息
	 */
	@RequestMapping("/pagingselecthouse")
	public String pagingselecthouse(Model model, @RequestParam(value = "pn", defaultValue = "1") Integer pn,
			@RequestParam(required = false, defaultValue = "6") Integer pageSize) {
		PageHelper.startPage(pn, 10);
		List<leaseinformation> leaseinformation = leaseinformationService.queryAll();
		PageInfo<leaseinformation> p = new PageInfo<leaseinformation>(leaseinformation, 3);

		model.addAttribute("p", p);
		return "housinglist";
	}

	/**
	 * 获取修改房源信息
	 */
	@RequestMapping("/getupdatehouse")
	public String getupdatehouse(int houseid, HttpServletRequest request) {
		List<leaseinformation> house = leaseinformationService.queryID(houseid);
		request.setAttribute("uphouse", house);
		return "houseupdate";
	}

	/**
	 * 修改房源信息
	 */
	@RequestMapping("/updatehouse")
	public String updatehouse(Integer houseid, String housetype, String address, String area, String rent, String state,
			HttpServletRequest request) {
		leaseinformation house = leaseinformationService.queryID(houseid).get(0);
		request.removeAttribute("uphouse");
		house.setHouseaddress(address);
		house.setHousemoney(rent);
		house.setHousetype(housetype);
		house.setHousesize(Double.valueOf(area));
		house.setHousestate(state);
		house.setHouseid(houseid);
		leaseinformationService.updateByPrimaryKey(house);
		request.setAttribute("sessce", "修改成功");
		request.setAttribute("newhouse", house);
		return "houseupdate";
	}

	/**
	 * 删除房源信息
	 */
	@RequestMapping("/delethouse")
	public String delethouse(int houseid, HttpServletRequest request) {
		if (houseid >= 0) {
			int id = leaseinformationService.queryID(houseid).get(0).getId();

			leaseinformationService.deleteByPrimaryKey(houseid);
			leaseimgService.deleteByPrimaryKey(id);
		}
		return "redirect:pagingselecthouse.do";
	}

	/*
	 * 推荐房屋列表
	 */
	@RequestMapping("/recommendlist")
	public String recommendlist(Model model, @RequestParam(value = "pn", defaultValue = "1") Integer pn,
			@RequestParam(required = false, defaultValue = "6") Integer pageSize) {
		PageHelper.startPage(pn, 10);
		List<leaseinformation> leaseinformation = leaseinformationService.selectAllLeasable();
		PageInfo<leaseinformation> p = new PageInfo<leaseinformation>(leaseinformation, 3);
		model.addAttribute("p", p);
		return "recommendhouse";
	}

	/**
	 * 修改推荐信息
	 */
	@RequestMapping("/updaterecommend")
	public String updatehouse(Integer houseid) {
		leaseinformation house = leaseinformationService.queryID(houseid).get(0);
		if (house.getHouserecommend().equals("未推荐")) {
			house.setHouserecommend("已推荐");
		} else {
			house.setHouserecommend("未推荐");
		}
		leaseinformationService.updateByPrimaryKey(house);
		return "redirect:recommendlist.do?";
	}

	/**
	 * 分页查询日程信息
	 */
	@RequestMapping("/schedulelist")
	public String mydailylifelist(@RequestParam(value = "pn", defaultValue = "1") Integer pn, Model model) {
		// 引用PageHelper分页插件
		PageHelper.startPage(pn, 10);
		List<mydailylife> mydailylifes = mydailylifeService.selectAll();
		PageInfo<mydailylife> page = new PageInfo<mydailylife>(mydailylifes, 3);
		model.addAttribute("p", page);
		return "schedulelist";
	}

	/**
	 * 添加日程
	 */
	@RequestMapping("/addmydailylife")
	public String mydailylifeadd(mydailylife mydailylife) {
		mydailylifeService.insert(mydailylife);
		return "redirect:/admin/schedulelist.do";
	}

	/**
	 * 修改日程
	 */
	@RequestMapping("/updatemydailylife")
	public String mydailylifeupdate1(Integer id, HttpServletRequest request) {
		mydailylife mydailylife = mydailylifeService.selectByPrimaryKey(id);
		request.setAttribute("mydailylife", mydailylife);
		return "scheduleupdate";
	}

	@RequestMapping("/toupdate")
	public String mydailylifeupdate2(mydailylife mydailylife) {
		mydailylifeService.updateByPrimaryKey(mydailylife);
		return "redirect:/admin/schedulelist.do";
	}

	/**
	 * 删除日程
	 */
	@RequestMapping("/delmydailylife")
	public String mydailylifedel(Integer id) {
		mydailylifeService.deleteByPrimaryKey(id);
		return "redirect:/admin/schedulelist.do";
	}

	// 报障
	/**
	 * 查询待处理报障
	 */
	@RequestMapping("/Adminselectrepairwait")
	public String selectrepairwait(String state, @RequestParam(value = "pn", defaultValue = "1") Integer pn,
			Model model) {
		state = "未处理";
		// 引用PageHelper分页插件
		PageHelper.startPage(pn, 10);
		List<fault> faultlist = faultService.AdminSelectStateAll(state);
		PageInfo<fault> page = new PageInfo<fault>(faultlist, 3);
		model.addAttribute("p", page);
		return "repairwait";
	}

	/**
	 * 已完成全部报障
	 */
	@RequestMapping("/Adminselectrepairdone")
	public String selectrepairdone(String state, @RequestParam(value = "pn", defaultValue = "1") Integer pn,
			Model model) {
		state = "已处理";
		// 引用PageHelper分页插件
		PageHelper.startPage(pn, 10);
		List<fault> faultdone = faultService.AdminSelectStateAll(state);
		PageInfo<fault> page = new PageInfo<fault>(faultdone, 3);
		model.addAttribute("p", page);
		return "repairdone";
	}

	/**
	 * 报障状态修改
	 */
	@RequestMapping("/adminrepairwait")
	public String updaterepairwait(Integer id) {
		fault fault = faultService.selectByPrimaryKey(id);
		String fhouseid = fault.getFhouseid();
		String fhouseaddress = fault.getFhouseaddress();
		Double fprice = fault.getFprice();
		Date fdate = fault.getFdate();
		String fcontent = fault.getFcontent();
		String fusername = fault.getFusername();
		String fuserid = fault.getFuserid();
		String fuserphone = fault.getFuserphone();
		String fstate = "已处理";
		fault f = new fault(fhouseid, fhouseaddress, fprice, fdate, fcontent, fusername, fuserid, fuserphone, fstate,
				id);
		faultService.updateByPrimaryKey(f);
		return "redirect:/admin/Adminselectrepairwait.do";
	}

	/**
	 * 报障删除
	 */
	@RequestMapping("/adminrepairdone")
	public String delrepair(Integer id) {
		faultService.deleteByPrimaryKey(id);
		return "redirect:/admin/Adminselectrepairdone.do";
	}

	/**
	 * 搜索报障
	 */
	@RequestMapping("/repairselect")
	public String repairselect(QueryVo vo, @RequestParam(value = "pn", defaultValue = "1") Integer pn, Model model) {
		// 引用PageHelper分页插件
		PageHelper.startPage(pn, 10);
		List<fault> faultdone = faultService.repairselect(vo);
		for (fault temp : faultdone) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			String date = sdf.format(temp.getFdate());
			temp.setFdatetemp(date);
		}
		PageInfo<fault> page = new PageInfo<fault>(faultdone, 3);
		model.addAttribute("p", page);
		model.addAttribute("vo", vo);
		return "repairdone";
	}

	/**
	 * 我要收租
	 */
	@RequestMapping("/adminrentshou")
	public String rentshou(@RequestParam(value = "pn", defaultValue = "1") Integer pn, Model model) {
		// 引用PageHelper分页插件
		PageHelper.startPage(pn, 10);
		List<userlist> userlists = userlistService.rentSelectAll();
		PageInfo<userlist> page = new PageInfo<userlist>(userlists, 3);
		model.addAttribute("rent", page);
		return "rentshou";
	}

	/**
	 * 获取收租信息
	 */
	@RequestMapping("/adminrentselect")
	public String rentadd(String housecall, Model model) {
		userlist userlist = userlistService.selectUserCallWith(housecall);
		model.addAttribute("addrent", userlist);
		return "rentadd";
	}

	/**
	 * 添加代缴租金
	 */
	@RequestMapping("/adminrentadd")
	public String rentaddwait(rentcollection rentcollection) {
		rentcollectionService.insert(rentcollection);
		return "redirect:/admin/adminrentshou.do";
	}

	/**
	 * 代缴租金
	 */
	@RequestMapping("/adminrentwait")
	public String rentwait(String rcstate, @RequestParam(value = "pn", defaultValue = "1") Integer pn, Model model) {
		rcstate = "未缴纳";
		// 引用PageHelper分页插件
		PageHelper.startPage(pn, 10);
		List<rentcollection> rentlists = rentcollectionService.selectPaidStateAll(rcstate);
		PageInfo<rentcollection> page = new PageInfo<rentcollection>(rentlists, 3);
		model.addAttribute("rent", page);
		return "rentwait";
	}

	/**
	 * 删除租金缴纳记录
	 */
	@RequestMapping("/admindelrent")
	public String delrent(Integer id) {
		rentcollectionService.deleteByPrimaryKey(id);
		return "redirect:/admin/adminselectPaidAll.do";
	}

	/**
	 * 搜索查询
	 */
	@RequestMapping("/adminselectPaidAll")
	public String adminselectPaidAll(QueryVo vo, @RequestParam(value = "pn", defaultValue = "1") Integer pn,
			Model model) {
		// 引用PageHelper分页插件
		PageHelper.startPage(pn, 10);
		List<rentcollection> rentlists = rentcollectionService.selectPaidAll(vo);
		for (rentcollection temp : rentlists) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			String date = sdf.format(temp.getRcdate());
			temp.setRcdatetemp(date);
			if(temp.getRcpaiddate()!=null) {
				String Rcpaiddate = sdf.format(temp.getRcpaiddate());
				temp.setRcpaiddatetemp(Rcpaiddate);
			}

		}
		PageInfo<rentcollection> page = new PageInfo<rentcollection>(rentlists, 3);
		model.addAttribute("rent", page);
		model.addAttribute("vo", vo);
		return "rentdone";
	}

	/**
	 * 查看合同
	 */
	@RequestMapping("/viewcontractadmin")
	public ModelAndView viewcontractadmin(String username, String userid, String houseaddress,
			String housestartingdatetemp, String houseclosingdatetemp, String housemoney, String userphone,
			String houseid, HttpServletRequest request, HttpSession session) {
		ModelAndView mav = new ModelAndView("rentinglist");
		String arraytemp[] = { username, userid, houseaddress, housestartingdatetemp, houseclosingdatetemp, housemoney,
				userphone, houseid };
		System.out.println(Arrays.toString(arraytemp));
		String temp = arraytemp[7] + "pdf.pdf";
		File filetemp = new File("C://Users/Rain/Desktop/ssm_leaseOfHouses/WebContent/contract/pdf/" + temp);
		if (!filetemp.exists()) {
			System.out.println(new DocumentConversion().DocumentGeneration(arraytemp));
			new DocumentConversion().PdfGeneration(arraytemp[7]);
			filetemp = new File("C://Users/Rain/Desktop/ssm_leaseOfHouses/WebContent/contract/pdf/" + temp);
		}

		String pdf = filetemp.getName();
		// 放入转发参数
		mav.addObject("pdftemp", pdf);

		return mav;
	}
}

个人中心控制器

/**
 * 个人中心控制器
 *
 * @author yy
 *
 */
@Controller
@RequestMapping("/personacentermvc")
public class PersonacenterController {

	@Resource
	private RentwithdrawnService rentwithdrawnService;

	@Resource
	private UserlistService userlistService;

	@Resource
	private LeaseinformationService leaseinformationService;

	@Resource
	private CheckoutapplicationService checkoutapplicationService;

	@Resource
	private RentcollectionService rentcollectionService;

	@Resource
	private FaultService faultService;

	@Resource
	private HeadPortraitImgService headPortraitImgService;

	/**
	 * 个人信息切换页面
	 */
	@RequestMapping("/personal_switch")
	public void temp(String txt, HttpServletResponse response) throws IOException {
		response.setCharacterEncoding("UTF-8");
		switch (txt) {
		case "租赁信息":
			response.getWriter().print("/jsp/personalInformation/information.jsp");
			break;
		case "我的申请":
			response.getWriter().print("/jsp/personalInformation/myapplication.jsp");
			break;
		case "代缴租金":
			response.getWriter().print("/jsp/personalInformation/rentpayment.jsp");
			break;
		case "报障模块":
			response.getWriter().print("/jsp/personalInformation/faultreportingmodule.jsp");
			break;
		case "其他操作":
			response.getWriter().print("/jsp/personalInformation/otheroperations.jsp");
			break;
		}
	}

	/**
	 * 我的租赁分页查询
	 */
	@RequestMapping("/myRentalList")
	@ResponseBody
	public Msg myRentalList(@RequestParam(value = "pn") Integer pn, HttpSession session) {
		// 查询所有数据
		userlist user = userlistService.selectUserCall((String) session.getAttribute("user"));
		// 设置分页传输
		PageHelper.startPage(pn, 8);
		List<userlist> leaseuser = userlistService.selectUserNameWith(user.getUsername());
		// 使用PageInFo封装查询结果
		PageInfo<userlist> pageInfo = new PageInfo<userlist>(leaseuser, 3);

		return Msg.success().add("pageInfo", pageInfo);
	}

	/**
	 * 已退租赁记录分页查询
	 */
	@RequestMapping("/refundedLeaseList")
	@ResponseBody
	public Msg refundedLeaseList(@RequestParam(value = "pn") Integer pn, HttpSession session) {
		// 查询所有数据
		userlist user = userlistService.selectUserCall((String) session.getAttribute("user"));
		// 设置分页传输
		PageHelper.startPage(pn, 8);
		List<rentwithdrawn> list = rentwithdrawnService.queryAllStateName("已退租", "", user.getUsername());

		// 使用PageInFo封装查询结果
		PageInfo<rentwithdrawn> pageInfo = new PageInfo<rentwithdrawn>(list, 3);

		return Msg.success().add("pageInfo", pageInfo);
	}

	/**
	 * 申请状态记录分页查询
	 */
	@RequestMapping("/applicationAtatusList")
	@ResponseBody
	public Msg applicationAtatusList(@RequestParam(value = "pn") Integer pn, boolean flag, HttpSession session) {
		List<checkoutapplication> list = null;
		userlist user = userlistService.selectUserCall((String) session.getAttribute("user"));
		// 设置分页传输
		PageHelper.startPage(pn, 8);
		// 查询所有数据
		if (flag) {
			list = checkoutapplicationService.selectStateAll("看房申请中", "退房申请中", "", user.getUsername());
		} else {
			list = checkoutapplicationService.selectStateAll("已拒绝", "已同意", "已取消", user.getUsername());
		}

		// 使用PageInFo封装查询结果
		PageInfo<checkoutapplication> pageInfo = new PageInfo<checkoutapplication>(list, 3);

		return Msg.success().add("pageInfo", pageInfo);
	}

	/**
	 * 代缴租金分页查询
	 */
	@RequestMapping("/rentpaymentList")
	@ResponseBody
	public Msg rentpaymentList(@RequestParam(value = "pn") Integer pn, String state, HttpSession session) {
		userlist user = userlistService.selectUserCall((String) session.getAttribute("user"));
		// 设置分页传输
		PageHelper.startPage(pn, 8);
		List<rentcollection> list = rentcollectionService.queryPaidStateAll(state, user.getUsername());
		// 使用PageInFo封装查询结果
		PageInfo<rentcollection> pageInfo = new PageInfo<rentcollection>(list, 3);

		return Msg.success().add("pageInfo", pageInfo);
	}

	/**
	 * 缴纳租金
	 */
	@RequestMapping("/payrentmvc")
	public ModelAndView payrentmvc(String rchousemoney,Integer rcid,String token,HttpServletRequest request,HttpSession session) {
		ModelAndView mav = new ModelAndView("personacenter");
		//令牌验证
		if(!new Koken().kokenid(request, session)) {
			return mav;
		}
		Warning news = rentcollectionService.updateState(rcid);
		System.out.println(news.getWarningContent());
		// 放入转发参数
		mav.addObject("news", news);
		return mav;
	}

	/**
	 * 已缴纳租金删除记录
	 */
	@RequestMapping("/paidrent")
	public ModelAndView paidrent(Integer rcid,HttpServletRequest request,HttpSession session) {
		ModelAndView mav = new ModelAndView("personacenter");
		//令牌验证
		if(!new Koken().kokenid(request, session)) {
			return mav;
		}
		Warning news = rentcollectionService.deleteByPrimaryKey(rcid);
		System.out.println(news.getWarningContent());
		// 放入转发参数
		mav.addObject("news", news);
		return mav;
	}

	/**
	 * 共缴费费用
	 */
	@RequestMapping("/copaymentfee")
	@ResponseBody
	public Msg copaymentfee(String state, HttpSession session) {
		userlist user = userlistService.selectUserCall((String) session.getAttribute("user"));
		List<rentcollection> list = rentcollectionService.queryPaidStateAll(state, user.getUsername());
		int num = 0;
		for (rentcollection temp : list) {
			num += Float.parseFloat(temp.getRchousemoney());
		}
		return Msg.success().add("num", num);
	}

	/**
	 * 报障分页查询
	 */
	@RequestMapping("/repairList")
	@ResponseBody
	public Msg repairList(@RequestParam(value = "pn") Integer pn, String str, HttpSession session) {
		// 使用PageInFo封装查询结果
		userlist user = userlistService.selectUserCall((String) session.getAttribute("user"));
		// 设置分页传输
		PageHelper.startPage(pn, 8);
		if (str.equals("我要报障")) {
			List<userlist> leaseuser = userlistService.selectUserNameWith(user.getUsername());
			PageInfo<userlist> pageInfo = new PageInfo<userlist>(leaseuser, 3);
			return Msg.success().add("pageInfo", pageInfo);
		}

		List<fault> list = faultService.queryAllState(str, user.getUsername());
		PageInfo<fault> pageInfo = new PageInfo<fault>(list, 3);

		return Msg.success().add("pageInfo", pageInfo);
	}

	/**
	 * 报障提交内容
	 *
	 * @throws ParseException
	 */
	@RequestMapping("/contentofthereport")
	public ModelAndView contentofthereport(String date, String housecall, String contentofthe,String token,HttpServletRequest request,HttpSession session) throws ParseException {
		ModelAndView mav = new ModelAndView("personacenter");
		//令牌验证
		if(!new Koken().kokenid(request, session)) {
			return mav;
		}
		userlist user = userlistService.selectUserCallWith(housecall);
		fault fault = new fault();
		fault.setFhouseid(housecall);
		fault.setFhouseaddress(user.getLeaseinformation().getHouseaddress());
		fault.setFprice(Double.parseDouble(user.getLeaseinformation().getHousemoney()));
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
		Date t1 = sdf.parse(date);
		fault.setFdate(t1);
		fault.setFdatetemp(date);
		fault.setFcontent(contentofthe);
		fault.setFusername(user.getUsername());
		fault.setFuserid(user.getUserid());
		fault.setFuserphone(user.getUserphone());
		fault.setFstate("未处理");
		Warning news = faultService.insert(fault);
		System.out.println(news.getWarningContent());
		// 放入转发参数
		mav.addObject("news", news);
		return mav;
	}

	/**
	 * 报障删除记录
	 */
	@RequestMapping("/deleterepair")
	public ModelAndView deleterepair(Integer fid,String token,HttpServletRequest request,HttpSession session) {
		ModelAndView mav = new ModelAndView("personacenter");
		//令牌验证
		if(!new Koken().kokenid(request, session)) {
			return mav;
		}
		Warning news = faultService.deleteByPrimaryKey(fid);
		System.out.println(news.getWarningContent());
		// 放入转发参数
		mav.addObject("news", news);
		return mav;
	}

	/**
	 * 头像上传 用户真实姓名,身份证号,手机号上传
	 *
	 * @throws FileNotFoundException
	 */
	@RequestMapping("/file")
	public ModelAndView file(String username,String userid,String userphone,HttpServletRequest request,HttpSession session,@RequestParam MultipartFile file) throws Exception {
		System.out.println(username);

		ModelAndView mav = new ModelAndView("personacenter");
		userlist usere=userlistService.selectUserName(username);
		if (usere==null) {
			session.setAttribute("modifyerro",null);
			System.out.println("可修改");
		}else {
			Warning news=new Warning(2, "修改失败!该姓名用户已注册");
			mav.addObject("news", news);
			return mav;
		}

		//令牌验证
		if(!new Koken().kokenid(request, session)) {
			return mav;
		}
		// 获取文件的名称
		String fName = file.getOriginalFilename();
		System.out.println(fName);
		if (!fName.equals("")) {
			// 保存图片的目录
			String path = "C://Users/Rain/Desktop/ssm_leaseOfHouses/WebContent/headPortraitImg";
			File filepath = new File(path);
			// 如果目录不存在,创建
			if (!filepath.exists()) {
				filepath.mkdir();
			}

			File f = new File(path, fName);

			// 更改用户头像
			headportraitimg headportraitimg = new headportraitimg();
			String user = (String) session.getAttribute("user");
			headportraitimg.setHeadportraitimgusername(user);
			headportraitimg.setHeadportraitimgaddress(fName);
			// 图片路径上传到数据库
			headPortraitImgService.updatauserimg(headportraitimg);
			// 更换头像
			session.setAttribute("headportraitimg", headportraitimg.getHeadportraitimgaddress());
			// 上传文件
			file.transferTo(f);
		}

		userlist user = userlistService.selectUserCall((String) session.getAttribute("user"));
		//暂时储存需要修改的真实姓名
		String rcusernametemp=user.getUsername();
		//判断,如有真实姓名联表修改,则添加
		if(user.getUsername()==null||"".equals(user.getUsername())) {
			// 上传真实姓名,身份证,手机号
			userlist userlist = new userlist();
			userlist.setUsercall((String) session.getAttribute("user"));
			userlist.setUsername(username);
			userlist.setUserid(userid);
			userlist.setUserphone(userphone);
			Warning news = userlistService.updateByPrimaryCall(userlist);
			System.out.println(news.getWarningContent());
			// 放入转发参数
			mav.addObject("news", news);
		}else {
			// 修改真实姓名,身份证,手机号
			userlist userlist = new userlist();
			userlist.setUsername(username);
			userlist.setUserid(userid);
			userlist.setUserphone(userphone);
			userlist.setUsernametemp(user.getUsername());
			Warning news = userlistService.updateJointTableName(userlist);
			//修改租金真实姓名
			System.out.println(rentcollectionService.updateUserName(username,rcusernametemp));
			System.out.println(news.getWarningContent());
			// 放入转发参数
			mav.addObject("news", news);
		}

		return mav;
	}

	/**
	 * 删除已退租记录
	 */
	@RequestMapping("/deleterentrefund")
	public ModelAndView deleterentrefund(Integer rwid,String token,HttpServletRequest request,HttpSession session) {
		ModelAndView mav = new ModelAndView("personacenter");
		//令牌验证
		if(!new Koken().kokenid(request, session)) {
			return mav;
		}
		Warning news = rentwithdrawnService.deleteByPrimaryKey(rwid);
		System.out.println(news.getWarningContent());
		// 放入转发参数
		mav.addObject("news", news);
		return mav;
	}

	/**
	 * 查看合同
	 */
	@RequestMapping("/viewcontract")
	public ModelAndView viewcontract(String username, String userid, String houseaddress, String housestartingdatetemp,
			String houseclosingdatetemp, String housemoney, String userphone, String houseid,HttpServletRequest request,HttpSession session) {
		ModelAndView mav = new ModelAndView("personacenter");
		String arraytemp[] = { username, userid, houseaddress, housestartingdatetemp, houseclosingdatetemp, housemoney,
				userphone, houseid };
		String temp = (arraytemp[0]+arraytemp[7]) + "pdf.pdf";
		File filetemp = new File("C://Users/Rain/Desktop/ssm_leaseOfHouses/WebContent/contract/pdf/" + temp);
		if (!filetemp.exists()) {
//			System.out.println(new DocumentConversion().DocumentGeneration(arraytemp));
			new DocumentConversion().PdfGeneration((arraytemp[0]+arraytemp[7]));
			filetemp = new File("C://Users/Rain/Desktop/ssm_leaseOfHouses/WebContent/contract/pdf/" + temp);
		}

		String pdf = filetemp.getName();
		// 放入转发参数
		mav.addObject("pdftemp", pdf);

		return mav;
	}

	/**
	 * 终止合同
	 */
	@RequestMapping("/termination")
	public ModelAndView termination(String call,String token,HttpServletRequest request,HttpSession session) {
		ModelAndView mav = new ModelAndView("personacenter");
		//令牌验证
		if(!new Koken().kokenid(request, session)) {
			return mav;
		}
		userlist leaseuser = userlistService.selectUserCallWith(call);
		Warning news = checkoutapplicationService.insert(leaseuser);
		// 放入转发参数
		mav.addObject("news", news);
		return mav;
	}

	/**
	 * 终止申请
	 */
	@RequestMapping("/stopapplying")
	public ModelAndView stopapplying(String call,String token,HttpServletRequest request,HttpSession session) {
		ModelAndView mav = new ModelAndView("personacenter");
		//令牌验证
		if(!new Koken().kokenid(request, session)) {
			return mav;
		}
		Warning news = checkoutapplicationService.updateCallState("已取消", call);
		System.out.println(news.getWarningContent());
		// 放入转发参数
		mav.addObject("news", news);
		return mav;
	}

	/**
	 * 删除申请记录
	 */
	@RequestMapping("/deleterecord")
	public ModelAndView deleterecord(Integer coaid,String token,HttpServletRequest request,HttpSession session) {
		ModelAndView mav = new ModelAndView("personacenter");
		//令牌验证
		if(!new Koken().kokenid(request, session)) {
			return mav;
		}
		Warning news = checkoutapplicationService.deleteByPrimaryKey(coaid);
		System.out.println(news.getWarningContent());
		// 放入转发参数
		mav.addObject("news", news);
		return mav;
	}
}

以上就是Java实战之在线租房系统的实现的详细内容,更多关于Java租房系统的的资料请关注我们其它相关文章!

(0)

相关推荐

  • Java 实战项目锤炼之嘟嘟健身房管理系统的实现流程

    一.项目简述 功能包括: 前台+后台健身房管理系统,用户预订,教练选择.课程选 择,登录,后台管理等等. 二.项目运行 环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持) 项目技术: JSP +Spring + SpringMVC + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等. 系统操作模块

  • Java实现房屋出租系统详解

    目录 houseView house_Sevice House App 总结 houseView package house.view; import house.model.House; import house.sevice.house_Sevice; import house.tool.Utility; import java.util.Scanner; /** * 1 显示界面 * 2 接收用户的输入 * 3 调用houseService完成对房屋信息的各种输人 */ public cl

  • Java实现酒店客房管理系统

    本文实例为大家分享了Java实现酒店客房管理系统的具体代码,供大家参考,具体内容如下 LoginFrame.java package loginManage; import java.awt.Color; import java.awt.EventQueue; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing

  • Java 房屋租赁系统的实现流程

    一.项目简述 功能: 房源信息模块:房源信息展示.房源信息更新.房源信息 增加.房源信息删除 账户管理模块:账户登录.账户绑定.账户管理 租金结算模块:每月租金信息.租金交付功能.月租金收 入总^^克计 房屋租赁合同管理模块:房屋租赁合同录入.房屋租赁合 同展示.房屋租赁价格修改.房屋租赁合同终止 报障模块:租客报账.管理员报障审核.租客报B章统计 日程模块:收租日程显示等. 二.项目运行 环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ

  • java实现客房管理系统

    本文实例为大家分享了java实现客房管理系统的具体代码,供大家参考,具体内容如下 AddClient.java import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.A

  • Java实战之在线租房系统的实现

    目录 介绍 效果图 核心代码 用户控制器 管理员控制层 个人中心控制器 介绍 该系统有三个角色,分别是:普通用户.房屋中介.管理员.普通用户的功能:浏览房屋信息.预约看房.和中介聊天.申请成为中介等等.房屋中介的功能:发布房屋信息.和用户聊天.回复预约信息等等.管理员的功能:管理所有用户信息.管理权限信息.管理所有房屋信息.管理所有预约信息等等. 应用技术:SpringBoot + Redis + MySQL + Vue + SpringSecurity + JWT + ElasticSearc

  • Java项目实战之在线考试系统的实现(系统介绍)

    1.本系统和现在有的考试系统有以下几种优势: a.和现在有的系统比较起来,本系统有科目.章节.老师.学生.班级等信息的管理,还有批阅试卷查看已批阅试卷等.传统的考试系统划分并不细,业务功能简单. b.和学校的考试系统还有外面的考试系统比较起来,本系统是B/S结构,学校的考试系统一般为C/S结构,性能方面不如B/S结构,并且C/S接口需要安装客户端,客户端压力很大,我的系统只需要电脑具有浏览器,在同一局域网就可以进行考试. c.从架构方面来讲,我们的系统为分布式架构,传统的考试系统没有我们的架构合

  • Java实战之在线寄查快递系统的实现

    目录 介绍 效果图 核心代码 后台角色管理控制器 后台管理员管理控制器 投诉控制层 前台申请地点申请控制层 介绍 超级管理员:系统管理.用户管理.网点管理.运输点管理.快递员管理.网点申请管理(审核).报价管理(时效报价)等. 普通用户:注册登录.个人信息管理(个人资料.密码修改等).地址管理.实名认证.在线寄件(单件寄件.批量导入寄件).订单查询(物流信息查询).在线申请网点.投诉建议等. 网点管理员:揽收负责区域的快递,进行快递快递运输,确认到达快递,快递到达后指派网点下快递员进行派送. 运

  • Java实战宠物店在线交易平台的实现流程

    该系统分为前台和后台,前台可以自主注册,后台管理员角色,除基础脚手架外,实现的功能有:后台管理员功能有: 商品分类管理.商品管理.套餐管理.新闻分类管理.新闻管理.常见问题.关于我们.团队管理.订单查看和前台用户查看等功能. 前台用户功能有:注册登录.查看商品.购物车.支付订单.评价.照片库.新闻列表.个人中心.购买套餐等功能. 运行环境:windows/Linux均可.jdk1.8.mysql5.7.maven3.5\maven3.6.idea/eclipse均可. 系统控制器代码: /**

  • Java Online Exam在线考试系统的实现

    一.项目简述 本系统主要实现的功能有: 学生以及老师的注册登录,在线考试,错题查询,学生管理,问题管理,错题管理,错题查询,分数查询,试卷管 理,人工组卷.自动组卷,教师,班级,统计等等管理功能. 二.项目运行 环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持) 项目技术: VUE+Springboot+ SpringMVC + MyBatis + ThymeLeaf + Jav

  • Java实战个人博客系统的实现流程

    springboot+mybatis+前端vue,使用前后端分离架构实现的个人博客系统,共7个模块,首页,写博客,博客详情页,评论管理,文章分类,标签管理和文章归档. 运行环境: jdk8+tomcat8.5+mysql5.7+IntelliJ IDEA+maven 项目技术: springboot+mybatis+redis+vue+element ui 博客管理控制层: /** * @author yy */ @Controller public class MyblogController

  • Java实战之火车票预订系统的实现

    目录 一.项目运行 二.效果图 三.核心代码 个人中心Controller 管理员和员工登陆控制 用户管理操作 一.项目运行 环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持) 项目技术: JSP + Servlert + html+ css + JavaScript + JQuery + Ajax 等等: 二.效果图 三.核心代码 个人中心Controller /** * 个人中心

  • Java实战之晚会抽奖系统的实现

    目录 一.项目运行 二.效果图 三.核心代码 管理员登陆控制层 抽奖控制层一二三等奖设置 抢答控制层 一.项目运行 环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持) 项目技术: Jdbc+ Servlert + html+ css + JavaScript + JQuery + Ajax +等等 二.效果图 三.核心代码 管理员登陆控制层 public class adminAct

  • Java实战之兼职平台系统的实现

    目录 一.项目运行 二.效果图 三.核心代码 登录控制层 管理员登录控制层 提交个人简介控制层 一.项目运行 环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持) 项目技术: HTML +Springboot+ SpringMVC + MyBatis + ThymeLeaf + JavaScript + JQuery + Ajax + maven等等. 二.效果图 三.核心代码 登录控

  • Java 实战项目锤炼之在线购书商城系统的实现流程

    一.项目简述 功能:一个基于JavaWeb的网上书店的设计与实现,归纳 出了几个模块,首先是登录注册模块,图书查找模块,购 物车模块,订单模块,个人中心模块,用户管理模块,图 书管理模块等. 该项目是javaJeb技术的实战操作,采用了MVC设计模 式,包括基本的entity, jscript, servlet,以及ajax异步请 求,查询分页,持久化层方法的封装等等,对javaweb技 术的巩固很有帮助,为J2EE的学习打下基础,适用于课程 设计,毕业设计. 二.项目运行 环境配置: Jdk1

随机推荐