基于javaweb的客户关系管理系统(java+ssm+layui+shiro+redis+mysql)

基于javaweb的客户关系管理系统(java+ssm+layui+shiro+redis+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

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

功能说明

20220519000927

20220519000928

20220519000930

20220519000931

20220519000932

20220519000933

基于javaweb+SSM的客户关系管理系统(java+SSM+Layui+Shiro+Redis+mysql)

项目介绍

客户关系管理系统主要功能包括:

系统管理: 用户管理 日志管理 权限管理 角色管理 系统信息 客户管理 我的客户 联系跟进 客户流失 销售机会 客户服务 我的服务 服务统计 客户关怀 统计 个人中心

环境需要

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

系统框架

spring框架 springmvc框架 mybatis框架 Logback日志框架 安全验证框架 maven框架 layui前端框架 shiro安全框架 系统关键性技术 基于角色的权限访问控制RBCA(Role-BasedAccessControl) Spring+Springmvc+Mybatis三大框架 Ajax技术 springmvc文件上传 shiro安全框架 Redis缓存 JavaMail邮件 基于aop切面的日志管理 Layui前端框架 登录验证码 富文本输入框 md5加密加盐

使用说明

1.使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件,sql文件命名为crm2.sql,其中‘user’表为账户表; 2.部署项目前,需要配置好MqSQL数据库,Redis数据库、mail邮箱,这三个配置文件都在crm/src/main/resources/properties 3.使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行mavenclean;maveninstall命令,配置tomcat,然后运行; 4.项目登录帐号:malizhi(管理员级别),密码123456,部署项目后,可以到测试类中(test包下的TestUserService)进行添加账户,密码经过md5加密加盐 5.登录页:如果是本地部署http://localhost:8080/crm2/pages/login.jsp,端口号以及项目名要与部署的环境一致 6.订单可以在客户流失(客户是否流失由Spring定时器定时检测)模块中,点击客户详情,可以查看到此客户的历史订单,关于订单的数据问题,因为在企业模式中,订单数据是从销售系统中获取的,但由于没有外接销售系统,所以订单数据以及产品定价的数据是自个插入数据库的。

部署过程异常错误解决方法

1.权限,菜单都会缓存到redis中,如果redis无法连接,将会报空指针错误或登陆后首页会显示404,请确保能连接上redis数据库 2.如果有报此异常org/hyperic/sigar/SigarException,可以将WEB-INF/lib下的文件(根据你的系统以及位数选择)放在你的JDK/bin目录下 3.在发布出来前,由于隐私关系删除了部分登录帐号(客户经理),如果出现此客户找不到对应的客户经理,删掉此客户即可

客户管理控制层:

@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 find(@RequestBody QueryCustomerVo vo) {

return customerService.find(vo);

@RequestMapping(value = “/findAllCustomerCategory”, method = RequestMethod.POST)

@ResponseBody

public List findAllCustomerCategory() {

return customerService.findAllCustomerCategory();

@RequestMapping(value = “/findAllIndustry”, method = RequestMethod.POST)

@ResponseBody

public List findAllIndustry() {

return customerService.findAllIndustry();

@RequestMapping(value = “/findAllSource”, method = RequestMethod.POST)

@ResponseBody

public List 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 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 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 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 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 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 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) 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;


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
网选课系统是一个非常实用的系统,可以方便学生进行选课操作,也可以方便教师进行课程管理。下面是一个基于JavaWeb的网上选课系统的设计思路: 1. 系统架构 该系统采用 B/S 架构,即浏览器/服务器架构。前端使用 HTML、CSS、JavaScript 和 JQuery,后端使用 Java+SSM 框架和 MySQL 数据库。 2. 系统功能 (1)学生模块:学生可以登录系统后进行选课操作,查看已选课程,并对已选课程进行退选操作。 (2)教师模块:教师可以登录系统后进行课程管理操作,包括添加课程、修改课程、删除课程等操作。 (3)管理员模块:管理员可以登录系统后对学生和教师进行管理,包括添加学生、添加教师、修改学生信息、修改教师信息等操作。 (4)公告管理:管理员可以发布公告,学生和教师可以浏览公告。 (5)选课规则管理:管理员可以设置选课规则,例如每个学生最多选择多少门课程,每门课程最多选多少人等。 3. 数据库设计 该系统需要设计以下数据库表: (1)学生表:包括学生编号、学生姓名、学生性别、学生年龄、所在班级等字段。 (2)教师表:包括教师编号、教师姓名、教师性别、所教课程、教龄等字段。 (3)课程表:包括课程编号、课程名称、授课教师、上课时间、选课人数等字段。 (4)选课记录表:包括学生编号、课程编号等字段。 (5)公告表:包括公告编号、公告内容、发布时间等字段。 4. 技术实现 该系统采用 Java+SSM 框架进行实现,其中: (1)后端技术:采用 SpringMVC 框架进行控制器的开发,采用 MyBatis 框架进行数据库操作。 (2)前端技术:采用 HTML、CSS、JavaScript 和 JQuery 进行页面布局和交互效果的实现。 (3)数据库技术:采用 MySQL 数据库进行数据存储和管理。 5. 总结 网上选课系统是一个非常实用的系统,它可以方便学生进行选课操作,也可以方便教师进行课程管理。该系统采用 B/S 架构,采用 Java+SSM 框架进行开发,实现了学生模块、教师模块、管理员模块、公告管理和选课规则管理等功能。在实现时需要注意数据库表的设计和技术实现。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值