项目介绍
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版本;
技术栈
使用说明
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
@ResponseBody
public Result down(@RequestBody Menu menu) {
return menuService.down(menu.getMenuId());
}
}
用户管理控制层:
@Controller
@RequestMapping("/customer")
public class CustomerController extends AuthorizedController {
@Autowired
private CustomerService customerService;
@RequestMapping(value = "", method = RequestMethod.GET)
public String customer() {
return "crm/customer";
}
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
@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()) {
@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) {
@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
public Result checkMenuCode(@RequestBody Menu menu) {
return menuService.checkMenuCode(menu);
}
@RequestMapping(value = "/add", method = RequestMethod.POST)
@ResponseBody
public Result add(@RequestBody Menu menu) {
return menuService.insert(menu);
}
@RequestMapping(value = "/remove", method = RequestMethod.POST)
@ResponseBody
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)
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");
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);
@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());
@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) {
@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;
}
}
系统菜单管理控制层:
@Controller()