基于javaweb+mysql的客户关系管理系统(java+SpringBoot+layui+html+maven+mysql)

项目介绍
CRM客户关系管理系统。本系统共分为三种角色:超级管理员、经理、销售人员;
超级管理员的功能主要有:
公司资料:部门结构、销售目录;
人员资料:销售人员、账号权限;
客户资料:客户列表;
销售跟踪:订单列表、报表统计;

图表分析:销售与客户分析、销售失败分析;

环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目
6.数据库:MySql 5.7版本;

技术栈

  1. 后端:SpringBoot;
  2. 前端:layui+html

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
  2. 将项目中application.yml配置文件中的数据库配置改为自己的配置
  3. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行;
  4. 运行项目,输入localhost:8080 登录
  5. 管理员账户:superAdmin 密码123456
    经理账户:user 密码:123456

6.销售人员账户:laji_ma 密码:123456请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

        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;
    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
    }
    @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 = "/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)
    @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;
    }
}
系统菜单管理控制层:
@Controller()
@RequestMapping("/menu")
public class MenuController extends AuthorizedController {
    @Autowired
    private MenuService menuService;
    @RequestMapping(value = "", method = RequestMethod.GET)
    public String index() {
        return "sys/menu";
    }
    }
    @RequestMapping(value = "/findAllMenuTree", method = RequestMethod.POST)
    @ResponseBody
    public List<TreeNode<Menu>> findAllMenuTree() {
        return menuService.findAllMenuTree();
    }
    @RequestMapping(value = "/findUserMenuTree", method = RequestMethod.POST)
    @ResponseBody
    public List<TreeNode<Menu>> findUserMenuTree() {
        return menuService.findUserMenuTree(getUser().getUserId());
    }
    @RequestMapping(value = "/findRoleMenu", method = RequestMethod.POST)
    @ResponseBody
    public List<Menu> findRoleMenu(@RequestBody Role role) {
        return menuService.findRoleMenu(role.getRoleId());
    }
    @RequestMapping(value = "/checkMenuName", method = RequestMethod.POST)
    @ResponseBody
    public Result checkMenuName(@RequestBody Menu menu) {
        return menuService.checkMenuName(menu);
    }
    @RequestMapping(value = "/checkMenuCode", method = RequestMethod.POST)
    @ResponseBody
    }
    @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() {
系统菜单管理控制层:
@Controller()
@RequestMapping("/menu")
public class MenuController extends AuthorizedController {
    @Autowired
    private MenuService menuService;
    @RequestMapping(value = "", method = RequestMethod.GET)
    public String index() {
        return "sys/menu";
    }
    @RequestMapping(value = "/findAllMenu", method = RequestMethod.POST)
    @ResponseBody
    public List<Menu> findAllMenu() {
        return menuService.findAllMenu();
    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
        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 {

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值