首页 > 数据库 >Java项目:房产销售系统(java+SpringBoot+Mybaits+Vue+elementui+mysql)

Java项目:房产销售系统(java+SpringBoot+Mybaits+Vue+elementui+mysql)

时间:2024-10-13 08:52:36浏览次数:3  
标签:Vue return RequestMapping value method RequestMethod Java public SpringBoot

源码获取:俺的博客首页 "资源" 里下载! 

项目介绍

基于Springboot+vue的房产销售系统

本系统分为前后台,包含管理员、用户、销售经理三种角色,前台为普通用户登录,后台为管理员、用户、销售经理分别登录。

前台主要功能:首页、房源信息、用户登录、用户注册、用户个人中心、我的收藏等功能;

后台管理员主要功能:首页、个人中心、用户管理、销售经理管理、房源信息管理、房源类型管理、房子户型管理、交易订单管理、预约看房管理、评价管理、我的收藏管理、系统管理等。


环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 
4.数据库:MySql 5.7/8.0版本均可;
5.是否Maven项目:是;


技术栈

后端:SpringBoot+Mybaits

前端:Vue+elementui


使用说明

项目运行:
1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;
3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;
4. 运行项目,在浏览器中输入地址:
前台地址:http://localhost:8080/springbootbqv00/front/index.html

后台地址
http://localhost:8080/springbootbqv00/admin/dist/index.html
管理员: abo 密码: abo
用户:用户1 密码: 123456


注意项目文件路径中不能含有中文、空格、特殊字符等,否则图片会上传不成功。

 

 

客户管理控制层:

@Controller
@RequestMapping("/customer")
public class CustomerController extends AuthorizedController {

    @Autowired
    private CustomerService customerService;

    @RequestMapping(value = "", method = RequestMethod.GET)
    public String customer() {
        return "crm/customer";
    }

    @RequestMapping(value = "/find", method = RequestMethod.POST)
    @ResponseBody
    public PageInfo<Customer> find(@RequestBody QueryCustomerVo vo) {
        return customerService.find(vo);
    }

    @RequestMapping(value = "/findAllCustomerCategory", method = RequestMethod.POST)
    @ResponseBody
    public List<CustomerCategory> findAllCustomerCategory() {
        return customerService.findAllCustomerCategory();
    }

    @RequestMapping(value = "/findAllIndustry", method = RequestMethod.POST)
    @ResponseBody
    public List<Industry> findAllIndustry() {
        return customerService.findAllIndustry();
    }

    @RequestMapping(value = "/findAllSource", method = RequestMethod.POST)
    @ResponseBody
    public List<Source> findAllSource() {
        return customerService.findAllSource();
    }

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    public Result add(@RequestBody Customer customer) {
        customer.setCreateBy(getUser().getUserId());
        return customerService.insert(customer);
    }

    @RequestMapping(value = "/checkCustomerName", method = RequestMethod.POST)
    @ResponseBody
    public Result checkCustomerName(@RequestBody Customer customer) {
        return customerService.checkCustomerName(customer);
    }

    @RequestMapping(value = "/findById", method = RequestMethod.POST)
    @ResponseBody
    public Customer findById(@RequestBody Customer customer) {
        return customerService.findById(customer.getCustomerId());
    }

    @RequestMapping(value = "/update", method = RequestMethod.POST)
    @ResponseBody
    public Result update(@RequestBody Customer customer) {
        return customerService.update(customer);
    }

    @RequestMapping(value = "/dashboard/{customerId}", method = RequestMethod.GET)
    public ModelAndView dashboard(@PathVariable int customerId) {
        ModelAndView vm = new ModelAndView("crm/customerDashboard");
        vm.addObject("customerId", customerId);
        return vm;
    }

    @RequestMapping(value = "/updateStar", method = RequestMethod.POST)
    @ResponseBody
    public Result updateStar(@RequestBody Customer customer) {
        return customerService.updateStar(customer);
    }

    @RequestMapping(value = "/updateLocation", method = RequestMethod.POST)
    @ResponseBody
    public Result updateLocation(@RequestBody Customer customer) {
        return customerService.updateLocation(customer);
    }
}

用户管理控制层:

@Controller
@RequestMapping("/user")
public class UserController extends AuthorizedController {

    @Autowired
    private UserService userService;

    @Autowired
    private HttpSession session;

    @RequestMapping(value = "", method = RequestMethod.GET)
    public String index() {
        return "sys/user";
    }

    @RequestMapping(value = "/find", method = RequestMethod.POST)
    @ResponseBody
    public PageInfo<User> find(@RequestBody QueryUserVo vo) {
        return userService.find(vo);
    }

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    public Result add(@RequestBody User user) {
        return userService.insert(user);
    }

    @RequestMapping(value = "/remove", method = RequestMethod.POST)
    @ResponseBody
    public Result delete(@RequestBody List<Integer> ids) {
        return userService.deleteByIds(ids);
    }

    @RequestMapping(value = "/findById", method = RequestMethod.POST)
    @ResponseBody
    public User findById(@RequestBody User user) {
        return userService.findById(user.getUserId());
    }

    @RequestMapping(value = "/update", method = RequestMethod.POST)
    @ResponseBody
    public Result update(@RequestBody User user) {
        Result result = userService.update(user);
        if (result.isSuccess() && user.getUserId() == getUser().getUserId()) {
            session.setAttribute("User", userService.findById(getUser().getUserId()));
        }
        return result;
    }

    @RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
    @ResponseBody
    public Result updateStatus(@RequestBody User user) {
        return userService.updateStatus(user);
    }

    @RequestMapping(value = "/checkUserName", method = RequestMethod.POST)
    @ResponseBody
    public Result checkUserName(@RequestBody User user) {
        return userService.checkUserName(user);
    }

    @RequestMapping(value = "/resetPassword", method = RequestMethod.POST)
    @ResponseBody
    public Result resetPassword(@RequestBody User user) {
        return userService.resetPassword(user);
    }

    @RequestMapping(value = "/profile", method = RequestMethod.GET)
    public String profile() {
        return "sys/profile";
    }

    @RequestMapping(value = "/updatePassword", method = RequestMethod.POST)
    @ResponseBody
    public Result updatePassword(@RequestBody UpdatePasswordVo vo) {
        return userService.updatePassword(vo);
    }
}

角色管理控制层:

@Controller
@RequestMapping("/role")
public class RoleController extends AuthorizedController {

    @Autowired
    private RoleService roleService;

    @RequestMapping(value = "", method = RequestMethod.GET)
    public String index() {
        return "sys/role";
    }

    @RequestMapping(value = "/findAll", method = RequestMethod.POST)
    @ResponseBody
    public List<Role> findAll() {
        return roleService.findAll();
    }

    @RequestMapping(value = "/checkRoleName", method = RequestMethod.POST)
    @ResponseBody
    public Result existRoleName(@RequestBody Role role) {
        return roleService.checkRoleName(role);
    }

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    public Result add(@RequestBody Role role) {
        return roleService.insert(role);
    }

    @RequestMapping(value = "/remove", method = RequestMethod.POST)
    @ResponseBody
    public Result delete(@RequestBody List<Integer> ids) {
        return roleService.deleteByIds(ids);
    }

    @RequestMapping(value = "/findById", method = RequestMethod.POST)
    @ResponseBody
    public Role findById(@RequestBody Role role) {
        return roleService.findById(role.getRoleId());
    }

    @RequestMapping(value = "/update", method = RequestMethod.POST)
    @ResponseBody
    public Result update(@RequestBody Role role) {
        return roleService.update(role);
    }

    @RequestMapping(value = "/user/{roleId}", method = RequestMethod.GET)
    public ModelAndView roleUser(@PathVariable int roleId) {
        ModelAndView vm = new ModelAndView("sys/roleUser");
        vm.addObject("roleId", roleId);
        return vm;
    }

    @RequestMapping(value = "/user/findUserInRole", method = RequestMethod.POST)
    @ResponseBody
    public PageInfo<User> findUserInRole(@RequestBody QueryRoleUserVo vo) {
        return roleService.findUserInRole(vo);
    }

    @RequestMapping(value = "/user/remove", method = RequestMethod.POST)
    @ResponseBody
    public Result deleteRoleUser(@RequestBody RoleUser roleUser) {
        return roleService.deleteRoleUser(roleUser);
    }

    @RequestMapping(value = "/user/findUserNotInRole", method = RequestMethod.POST)
    @ResponseBody
    public PageInfo<User> findUserNotInRole(@RequestBody QueryRoleUserVo vo) {
        return roleService.findUserNotInRole(vo);
    }

    @RequestMapping(value = "/user/add", method = RequestMethod.POST)
    @ResponseBody
    public Result addRoleUser(@RequestBody RoleUser roleUser) {
        return roleService.insertRoleUser(roleUser);
    }

    @RequestMapping(value = "/menu/{roleId}", method = RequestMethod.GET)
    public ModelAndView roleMenu(@PathVariable Integer roleId) {
        ModelAndView mv = new ModelAndView("sys/roleMenu");
        mv.addObject("roleId", roleId);
        return mv;
    }

    @RequestMapping(value = "/menu/saveMenu", method = RequestMethod.POST)
    @ResponseBody
    public Result saveMenu(@RequestBody Map map) {
        return roleService.saveRoleMenu((Integer) map.get("roleId"), (List<Integer>) map.get("menuIdList"));
    }

    @RequestMapping(value = "/fun/{roleId}", method = RequestMethod.GET)
    public ModelAndView roleFun(@PathVariable int roleId) {
        ModelAndView vm = new ModelAndView("sys/roleFun");
        vm.addObject("roleId", roleId);
        return vm;
    }
}

源码获取:俺的博客首页 "资源" 里下载!

标签:Vue,return,RequestMapping,value,method,RequestMethod,Java,public,SpringBoot
From: https://blog.csdn.net/m0_66863468/article/details/142893617

相关文章

  • Springboot在线学习辅导管理系统--49101(免费领源码)可做计算机毕业设计JAVA、PHP、爬虫
    摘 要信息化社会内需要与之针对性的信息获取途径,但是途径的扩展基本上为人们所努力的方向,由于站在的角度存在偏差,人们经常能够获得不同类型信息,这也是技术最为难以攻克的课题。针对在线学习辅导管理系统等问题,对在线学习辅导管理系统进行研究分析,然后开发设计出在线学习辅......
  • Springboot一个小说阅读APP的设计与实现--48151(免费领源码)可做计算机毕业设计JAVA、PH
    摘 要大数据时代下,数据呈爆炸式地增长。为了迎合信息化时代的潮流和信息化安全的要求,利用互联网服务于其他行业,促进生产,已经是成为一种势不可挡的趋势。在小说在线阅读的需求下,开发一款小说阅读APP,将复杂的系统进行拆分,能够实现对需求的变化快速响应、系统稳定性的保障,能保......
  • 基于SaaS的小区物业管理系统设计与实现--47357(免费领源码)可做计算机毕业设计JAVA、PHP
    摘 要本论文主要论述了如何使用SpringBoot开发一个基于SaaS的小区物业管理系统小程序,本系统将严格按照软件开发流程进行各个阶段的工作,面向对象编程思想进行项目开发。在引言中,作者将论述小区物业管理系统小程序的当前背景以及系统开发的目的,后续章节将严格按照软件开发流程......
  • 利用Vue3的axios+Python的flask实现前后端交互功能
    1功能实现1.1功能在网页中输入两个数字后,点击计算按钮在线计算(注意不是在浏览器端)获得两数之和。1.2思路前端使用vue3的axios向服务器发送post请求,利用flask框架使python服务器返回计算后的数值,赋给前端的变量,最终在浏览器上显示。2前端部分:2.1html<div><inputv-mod......
  • java异常捕获-cnblog
    java异常捕获1异常概述异常是一个程序执行期间发生的事件,他中断了正在执行的程序2异常的抛出和捕获做一个案例字符串转int异常packagenb;publicclassNaaa{publicstaticvoidmain(String[]args){Stringa="tttt";intage=Inte......
  • Solon-Boot 与 SpringBoot 的概念不同
    平常我们是拿Solon生态与SpringBoot生态作比较。而非Solon-Boot(仅是功能模块)与SpringBoot生态,但这两名字太容易让人误解了。Solon-BootSolon-Boot仅表示Solon的“服务端“启动模块组(相当于Solonserverbootstrap)。它是个“功能性”模块划分概念,跟Solon-Data,So......
  • 基于django+vue+Vue火车票预售系统【开题报告+程序+论文】-计算机毕设
    本系统(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。系统程序文件列表开题报告内容研究背景随着信息技术的飞速发展和人民生活水平的不断提高,铁路出行已成为人们日常生活中不可或缺的交通方式。传统的火车票购买方式,如排队购票或通......
  • 基于django+vue+Vue火车票订票系统【开题报告+程序+论文】-计算机毕设
    本系统(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。系统程序文件列表开题报告内容研究背景随着信息技术的飞速发展和人民生活水平的不断提高,铁路出行已成为人们日常生活中不可或缺的交通方式之一。传统的火车票购买方式,如排队购票......
  • 基于django+vue+Vue皓缘服装厂员工管理系统【开题报告+程序+论文】-计算机毕设
    本系统(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。系统程序文件列表开题报告内容研究背景随着服装行业的快速发展,企业管理面临越来越多的挑战,尤其是人力资源管理方面。皓缘服装厂作为一家具有一定规模的服装制造企业,在日常运营中......
  • 基于django+vue+Vue基于“互联网+”的智慧药房管理系统【开题报告+程序+论文】-计算机
    本系统(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。系统程序文件列表开题报告内容研究背景随着医疗技术的不断进步和人们对健康需求的日益增长,医院药房的管理效率和服务质量成为了医疗体系中不可或缺的一环。传统药房管理模式依赖......