项目介绍
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版本;
技术栈
- 后端:Spring SpringMVC MyBatis
- 前端:JSP+Layui+jQuery
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
- 将项目中db.properties配置文件中的数据库配置改为自己的配置
- 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行;
- 运行项目,输入localhost:8080/xxx 登录
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
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() {
@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) {
}
@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) {
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)
vm.addObject("roleId", roleId);
return vm;
}
}
客户管理控制层:
@Controller
@RequestMapping("/customer")
public class CustomerController extends AuthorizedController {
@Autowired
private CustomerService customerService;
@RequestMapping(value = "", method = RequestMethod.GET)
public String customer() {
return "crm/customer";
}
return vm;
}
}
客户管理控制层:
@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("/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);
@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)
@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);
}
@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 = "/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