Springboot实现销售团队管理系统
Posted 编程指南针
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Springboot实现销售团队管理系统相关的知识,希望对你有一定的参考价值。
项目编号:BS-XX-084
开发运行环境:
开发工具:IDEA /ECLIPSE
数据库:mysql5.7
是否使用Maven: 是
JDK: 1.8
开发技术:
后台:Springboot+springmvc+mybatis
前端:AdminLTE页面模板,angularJs框架,Jquery框架,BootStrap框架,Echarts开发图形报表
项目说明:
本项目是基于Springboot框架开发的一套用于管理销售团队的管理系统,结构springmvc和mybatis开发实现,前端采用:AdminLTE页面模板,angularJs框架,Jquery框架,BootStrap框架,Echarts开发图形报表。系统功能完整,页面简洁大方,系统具备完整的权限管理系统,可以自行设定菜单、角色、权限,给用户分配相应的权限,最大的亮点是前端界面设计的交互性非常好,操作也十分便利。目前设置共有三种角色:销售员,团队管理,系统管理员。
下面展示一下系统的相关功能:
系统登陆:
管理主界面
管理员具有所有操作功能,但主要是进行系统管理,业务管理交由销售员和团队领导去做
组织结构管理
给机构添加用户
菜单管理
用户管理
角色管理
为用户设置角色
给角色分配菜单
销售员进入系统
业务机会管理
客户管理
联系人管理
工作日报管理
销售主管登陆:除了拥有销售员的基本功能外,主要是查看团队的日报工作进展
团队日报
个人资料管理:各用户都有
以上是展示的基于Springboot实现的销售团队管理系统,系统的功能比较完整,最大的亮点是前端界面设计的交互性非常好,操作也十分便利,比较适合做毕业设计使用。
部分代码:CustomerController
package com.powerteam.controller.crm;
import com.github.pagehelper.PageInfo;
import com.powerteam.controller.AuthorizedController;
import com.powerteam.model.crm.Customer;
import com.powerteam.model.crm.CustomerCategory;
import com.powerteam.model.crm.Industry;
import com.powerteam.model.crm.Source;
import com.powerteam.service.crm.CustomerService;
import com.powerteam.vo.Result;
import com.powerteam.vo.crm.QueryCustomerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;import java.util.List;
@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);
CustomerService
package com.powerteam.service.crm;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.powerteam.mapper.crm.CustomerMapper;
import com.powerteam.model.crm.*;
import com.powerteam.vo.Result;
import com.powerteam.vo.crm.QueryCustomerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;import java.util.Date;
import java.util.List;@Service
public class CustomerService@Autowired
private CustomerMapper customerMapper;@Autowired
private ShareGroupService shareGroupService;@Autowired
private ActivityService activityService;public PageInfo<Customer> find(QueryCustomerVo vo)
if (!StringUtils.isEmpty(vo.getWord()))
vo.setWord("%" + vo.getWord() + "%");
if (!vo.isDisablePaging())
PageHelper.startPage(vo.getPageNum(), vo.getPageSize());
return new PageInfo<>(customerMapper.find(vo));
public List<CustomerCategory> findAllCustomerCategory()
return customerMapper.findAllCustomerCategory();
public List<Industry> findAllIndustry()
return customerMapper.findAllIndustry();
public List<Source> findAllSource()
return customerMapper.findAllSource();
@Transactional
public Result insert(Customer customer)
customer.setCreateDate(new Date());
customer.setOwner(customer.getCreateBy());
Result result = new Result();if (!checkCustomerName(customer).isSuccess())
result.setMessage("客户名称重复");
return result;
if (customerMapper.insert(customer) > 0)
ShareGroup shareGroup = new ShareGroup();
shareGroup.setResourceType(ResourceType.客户);
shareGroup.setResourceId(customer.getCustomerId());
shareGroup.setUserId(customer.getCreateBy());if (shareGroupService.insert(shareGroup).isSuccess())
Activity activity = new Activity();
activity.setResourceType(ResourceType.客户);
activity.setResourceId(customer.getCustomerId());
activity.setActivityType(ActivityType.系统跟踪);
activity.setContent("创建了客户");
activity.setCreateDate(new Date());
activity.setCreateBy(customer.getCreateBy());if (activityService.insert(activity).isSuccess())
result.setSuccess(true);
else
result.setMessage("新增客户失败");
else
result.setMessage("新增客户失败");
else
result.setMessage("新增客户失败");
return result;
public Result checkCustomerName(Customer customer)
return new Result(!customerMapper.existCustomerName(customer));
public Customer findById(Integer customerId)
return customerMapper.findById(customerId);
@Transactional
public Result update(Customer customer)
Result result = new Result();
result.setSuccess(customerMapper.update(customer) > 0);
return result;
@Transactional
public Result updateStar(Customer customer)
Result result = new Result();
Customer model = findById(customer.getCustomerId());
model.setStar(customer.getStar());
result.setSuccess(customerMapper.update(model) > 0);
return result;
@Transactional
public Result updateLocation(Customer customer)
Result result = new Result();
Customer model = findById(customer.getCustomerId());
model.setLng(customer.getLng());
model.setLat(customer.getLat());
result.setSuccess(customerMapper.update(model) > 0);
return result;
以上是关于Springboot实现销售团队管理系统的主要内容,如果未能解决你的问题,请参考以下文章