南京网站开发xuan南京乐识,wordpress添加留言,网页策划书,品牌注册商标流程及费用作者主页#xff1a;源码空间codegym 简介#xff1a;Java领域优质创作者、Java项目、学习资料、技术互助 文中获取源码 项目介绍
使用房产销售系统分为管理员和用户、销售经理三个角色的权限子模块。
管理员所能使用的功能主要有#xff1a;首页、个人中心、用户管理、销… 作者主页源码空间codegym 简介Java领域优质创作者、Java项目、学习资料、技术互助 文中获取源码 项目介绍
使用房产销售系统分为管理员和用户、销售经理三个角色的权限子模块。
管理员所能使用的功能主要有首页、个人中心、用户管理、销售经理管理、房源信息管理、房源类型管理、房子户型管理、交易订单管理、预约看房管理、评价管理、我的收藏管理、系统管理等。
用户可以实现首页、个人中心、房源信息管理、交易订单管理、预约看房管理、评价管理、我的收藏管理等。
销售经理可以实现首页、个人中心、房源信息管理、交易订单管理、预约看房管理、评价管理等。
环境要求
1.运行环境最好是java jdk1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境Tomcat7.x,8.X,9.x版本均可
4.硬件环境windows7/8/10 4G内存以上或者Mac OS;
5.是否Maven项目是查看源码目录中是否包含pom.xml;若包含则为maven项目否则为非maven.项目
6.数据库MySql5.7/8.0等版本均可
技术栈
运行环境jdk8 tomcat9 mysql5.7 windows10
服务端技术SpringBoot MyBatis Vue Bootstrap jQuery
使用说明
1.使用Navicati或者其它工具在mysql中创建对应sq文件名称的数据库并导入项目的sql文件
2.使用IDEA/Eclipse/MyEclipse导入项目修改配置运行项目
3.将项目中config-propertiesi配置文件中的数据库配置改为自己的配置然后运行
运行指导
idea导入源码空间站顶目教程说明(Vindows版)-ssm篇
http://mtw.so/5MHvZq
源码地址http://codegym.top
运行截图
文档截图 项目截图
前台 后台 代码
package com.lyyzoo.gpss.web;import com.lyyzoo.gpss.entity.system.User;
import com.lyyzoo.gpss.service.system.UserService;
import com.lyyzoo.gpss.util.VCodeGenerator;
import com.lyyzoo.util.Cryptos;
import com.lyyzoo.util.Strings;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.awt.image.BufferedImage;
import java.io.IOException;/*** p** author bojiangzhou* date 2017-03-29*/
Controller
RequestMapping()
public class HomeController extends BaseController {Autowiredprivate UserService userService;/*** 到首页/登录页面*/RequestMapping(value {, /, /index, /login})public String index(){return /index;}/*** 管理员主页*/RequestMapping(/admin/home)public String toHome(){return /home/home;}/*** 登录*/RequestMapping(value /login, method RequestMethod.POST)public String login(String account, String password, String vcode, HttpSession session){String redirect REDIRECT(/login);//基本验证if(Strings.isNullOrEmpty(account)){session.setAttribute(errorMsg, 账号必须填写!);return redirect;}if(Strings.isNullOrEmpty(password)){session.setAttribute(errorMsg, 密码必须填写!);return redirect;}if(Strings.isNullOrEmpty(vcode)){session.setAttribute(errorMsg, 验证码必须填写!);return redirect;}//验证码String sessionVcode (String) session.getAttribute(vcode);if(!vcode.equalsIgnoreCase(sessionVcode)){session.setAttribute(errorMsg, 验证码错误!);return redirect;}//验证用户名和密码password Cryptos.encryptMd5(password);User loginUser userService.login(account, password);if(loginUser null){session.setAttribute(errorMsg, 账号或密码错误!);return redirect;}if(loginUser.getIsLocked() User.IsLocked.YES){session.setAttribute(errorMsg, 账号已锁定不能登录!);return redirect;}//保存到session的时候清除密码User currentUser new User();BeanUtils.copyProperties(loginUser, currentUser);currentUser.setPassword(null);//登录成功session.setAttribute(currentUser, currentUser);return REDIRECT(/admin/home);}/*** 获取验证码*/RequestMapping(/vcode)public void getVCode(HttpSession session, HttpServletResponse response) throws IOException {//创建验证码生成器对象VCodeGenerator vcGenerator new VCodeGenerator();//生成验证码String vcode vcGenerator.generatorVCode();//将验证码保存在session域中,以便判断验证码是否正确session.setAttribute(vcode, vcode);//生成验证码图片BufferedImage vImg vcGenerator.generatorRotateVCodeImage(vcode, true);//输出图像ImageIO.write(vImg, gif, response.getOutputStream());}/*** 退出系统*/RequestMapping(/logoff)public String logoff(HttpSession session){session.invalidate();return REDIRECT(/);}RequestMapping(/function)public String function(){return /home/function;}RequestMapping(/welcome)public String welcome(){return /home/welcome;}/*** 错误页面* param code* return*/RequestMapping(/error/{code})public String error(PathVariable String code) {return /error/ code;}}