赞
踩
随着市场经济的深入发展,市场竞争、行业竞争越演越烈产品和服务的差
异越来越小。以生产为中心、以销售产品为目的的市场战略逐渐被以客户为中心、
以服务为目的的市场战略所取代。谁能掌握客户的需求趋势、加强与客户的关系、
有效发掘和管理客户资源,谁就能获得市场竞争优势,在激烈的竞争中立于不败
之地。企业、供应商、分销商及客户连成一片的价值链成为企业之间竞争的核心。
为房地产企业开发一套客户关系管理系统(Customer Relationship Management:
CRM)成为必然趋势。
该系统所面向的对象为企业的管理和销售人员.整个系统从符合操作 简便、界面友好、灵活、使用安全的要求出发,采用 IDEA 作为开发工具,MYSQL 作为后台数据库平台,基于 B/S 的三层模式的客户关系管理系统。旨在实现利用数据库来存储、管理大量数据信息.设计并完成对其各种 数据的分类、查询和统计,尽可能实现友好的操作界面。
客户关系管理系统将大大提高客户满意度和忠诚度,工作效率, 发掘客户价值,从而提高企业盈利.该系统将给房地产企业整个的信息化建设带来 深远而有意义的影响。
关键词:CRM;客户关系管理;IDEA;MYSQL数据库
【677】基于springboot的CRM客户关系管理系统源码和论文
(1)管理员表t_user
序号 | 列名 | 数据类型 | 长度 | 不是空 |
1 | id | int | 11 | True |
2 | user_name | varchar | 20 | False |
3 | user_pwd | varchar | 100 | False |
4 | true_name | varchar | 20 | False |
5 | | varchar | 30 | False |
6 | phone | varchar | 20 | False |
7 | is_valid | int | 11 | False |
8 | create_date | varchar | 100 | False |
用于保存管理员用户的相关基本信息,如表4.1所示。
(2)t_datadic表
用于保存服务类型的相关基本信息,如表4.2所示。
序号 | 列名 | 数据类型 | 长度 | 不是空 |
1 | id | int | 11 | True |
2 | data_dic_name | varchar | 50 | False |
3 | data_dic_value | varchar | 50 | False |
4 | is_valid | tinyint | 4 | False |
5 | create_date | varchar | 100 | False |
6 | update_date | varchar | 100 | False |
(3)t_customer_serve表
用于保存服务的相关基本信息,如表4.3所示。
序号 | 列名 | 数据类型 | 长度 | 不是空 |
1 | id | int | 11 | True |
2 | serve_type | varchar | 30 | False |
3 | overview | varchar | 500 | False |
4 | customer | varchar | 30 | False |
5 | state | varchar | 20 | False |
6 | service_request | varchar | 500 | False |
7 | create_people | varchar | 100 | False |
8 | assigner | varchar | 100 | False |
10 | service_proce | varchar | 500 | False |
11 | service_proce_people | varchar | 20 | False |
12 | service_proce_time | varchar | 100 | False |
13 | service_proce_result | varchar | 500 | False |
14 | myd | varchar | 50 | False |
15 | is_valid | int | 11 | False |
16 | update_date | varchar | 100 | False |
17 | create_date | varchar | 100 | False |
ABSTRACT
With the in-depth development of the market economy, market competition and industry competition are becoming more and more fierceThe difference is getting smaller and smaller. The market strategy of taking production as the center and selling products as the purpose is gradually being customer-centricReplaced by a market strategy for service. Who can grasp the demand trend of customers, strengthen the relationship with customersEffective exploration and management of customer resources, who can gain market competitive advantage and remain invincible in the fierce competitionThe land. The value chain of enterprises, suppliers, distributors and customers has become the core of competition among enterprises.Develop a customer relationship management system for real estate enterprises:CRM) has become an inevitable trend.
The object of the system is the management and sales personnel of enterprises Starting from the requirements of easy operation, friendly interface, flexibility and safe use, the entire system adopts IDEA as the development tool, MYSQL as the background database platform, and a customer relationship management system based on B/S three-tier model. It aims to use database to store and manage a large amount of data information Design and complete the classification, query and statistics of its various data, and achieve a friendly operation interface as far as possible.
Customer relationship management system will greatly improve customer satisfaction and loyalty, work efficiency, explore customer value, and thus improve enterprise profitability This system will bring far-reaching and meaningful influence to the whole information construction of real estate enterprises.
Keywords: CRM; Customer relationship management; IDEA; MYSQL database
- package com.xxxx.crm.controller;
-
- import com.xxxx.crm.base.BaseController;
- import com.xxxx.crm.base.ResultInfo;
- import com.xxxx.crm.query.CustomerServeQuery;
- import com.xxxx.crm.service.CustomerServeService;
- import com.xxxx.crm.utils.LoginUserUtil;
- import com.xxxx.crm.vo.CustomerServe;
- import org.springframework.stereotype.Controller;
- import org.springframework.ui.Model;
- import org.springframework.web.bind.annotation.PathVariable;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.ResponseBody;
-
- import javax.annotation.Resource;
- import javax.servlet.http.HttpServletRequest;
- import java.util.Map;
-
- @Controller
- @RequestMapping("/customer_serve")
- public class CustomerServeController extends BaseController {
-
- @Resource
- private CustomerServeService customerServeService;
-
- /**
- * 分页多条件查询客户服务数据
- * @param customerServeQuery
- * @return
- */
- @RequestMapping("/list")
- @ResponseBody
- public Map<String,Object> queryCustomerServeByParams(CustomerServeQuery customerServeQuery,
- Integer flag, HttpServletRequest request) {
- //判断是否执行服务处理,如果是则查询分配给当前登录用户的服务记录
- if(flag != null && flag == 1) {
- //设置查询条件:分配人
- customerServeQuery.setAssigner(LoginUserUtil.releaseUserIdFromCookie(request));
- }
- return customerServeService.queryCustomerServeByParams(customerServeQuery);
- }
-
- /**
- * 打开客户服务创建、服务分配、服务处理、服务反馈、服务归档页面
- * @param type
- * @return
- */
- @RequestMapping("/index/{type}")
- public String index(@PathVariable(value = "type") Integer type) {
- //判断类型是否为空
- if(type != null) {
- if(type == 1) {
- //进入服务创建页面
- return "customerServe/customer_serve";
- } else if(type == 2) {
- //进入服务分配页面
- return "customerServe/customer_serve_assign";
- } else if(type == 3) {
- //进入服务处理页面
- return "customerServe/customer_serve_proce";
- } else if(type == 4) {
- //进入服务反馈页面
- return "customerServe/customer_serve_feed_back";
- } else if(type == 5) {
- //进入服务归档页面
- return "customerServe/customer_serve_archive";
- } else {
- return "";
- }
- } else {
- return "";
- }
- }
-
- /**
- * 打开服务添加页面
- * @return
- */
- @RequestMapping("/toAddCustomerServePage")
- public String toAddCustomerServePage() {
- return "customerServe/customer_serve_add";
- }
-
- /**
- * 服务添加操作
- * @param customerServe
- * @return
- */
- @PostMapping("/add")
- @ResponseBody
- public ResultInfo addCustomerServe(CustomerServe customerServe) {
- customerServeService.addCustomerServe(customerServe);
- return success("条件成功");
- }
-
- /**
- * 服务更新操作(服务分配、服务处理、服务反馈)
- * @param customerServe
- * @return
- */
- @RequestMapping("/update")
- @ResponseBody
- public ResultInfo updateCustomerServe(CustomerServe customerServe) {
- customerServeService.updateCustomerServe(customerServe);
- return success("更新成功");
- }
-
- /**
- * 打开服务分配页面
- * @param id
- * @return
- */
- @RequestMapping("/toCustomerServeAssignPage")
- public String toCustomerServeAssignPage(Integer id, Model model) {
- //通过id查询服务记录
- CustomerServe customerServe = customerServeService.selectByPrimaryKey(id);
- //设置到请求域中
- model.addAttribute("customerServe",customerServe);
- return "customerServe/customer_serve_assign_add";
- }
-
- /**
- * 打开服务处理页面
- * @param id
- * @param model
- * @return
- */
- @RequestMapping("/toCustomerServeProcePage")
- public String toCustomerServeProcePage(Integer id, Model model) {
- //通过id查询服务记录
- CustomerServe customerServe = customerServeService.selectByPrimaryKey(id);
- //设置到请求域中
- model.addAttribute("customerServe",customerServe);
- return "customerServe/customer_serve_proce_add";
- }
-
- /**
- * 打开服务反馈页面
- * @param id
- * @param model
- * @return
- */
- @RequestMapping("/toCustomerServeFeedBackPage")
- public String toCustomerServeFeedBackPage(Integer id,Model model) {
- //通过id查询服务记录
- CustomerServe customerServe = customerServeService.selectByPrimaryKey(id);
- //设置到请求域中
- model.addAttribute("customerServe",customerServe);
- return "customerServe/customer_serve_feed_back_add";
- }
- }
- package com.xxxx.crm.controller;
-
- import com.xxxx.crm.annotation.RequiredPermission;
- import com.xxxx.crm.base.BaseController;
- import com.xxxx.crm.base.ResultInfo;
- import com.xxxx.crm.enums.StateStatus;
- import com.xxxx.crm.query.SaleChanceQuery;
- import com.xxxx.crm.service.SaleChanceService;
- import com.xxxx.crm.utils.CookieUtil;
- import com.xxxx.crm.utils.LoginUserUtil;
- import com.xxxx.crm.vo.SaleChance;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.ResponseBody;
-
- import javax.annotation.Resource;
- import javax.servlet.http.HttpServletRequest;
- import java.util.Map;
-
- @Controller
- @RequestMapping("/sale_chance")
- public class SaleChanceController extends BaseController {
-
- @Resource
- private SaleChanceService saleChanceService;
-
- /**
- * 分页条件查询营销机会数据列表 101001
- * @param saleChanceQuery
- * @param flag 如果flag的值不为空,并且值为1,则表示当前查询的是客户开发计划,否则查询营销机会
- * @return
- */
- @RequiredPermission(code = "101001")
- @RequestMapping("/list")
- @ResponseBody
- public Map<String,Object> querySaleChanceByParams(SaleChanceQuery saleChanceQuery,
- Integer flag, HttpServletRequest request) {
- if(flag != null && flag == 1) {
- //查询客户开发计划
- //1、设置分配状态
- saleChanceQuery.setState(StateStatus.STATED.getType());
- //2、设置指派人(当前登录用户的id)
- int userId = LoginUserUtil.releaseUserIdFromCookie(request);
- saleChanceQuery.setAssignMan(userId);
- }
- //查询营销机会数据
- return saleChanceService.querySaleChanceByParams(saleChanceQuery);
- }
-
- /**
- * 打开营销机会管理页面 1010
- * @return
- */
- @RequiredPermission(code = "1010")
- @RequestMapping("/index")
- public String index() {
- return "saleChance/sale_chance";
- }
-
- /**
- * 添加操作 101002
- * @param saleChance
- * @return
- */
- @RequiredPermission(code = "101002")
- @RequestMapping("/add")
- @ResponseBody
- public ResultInfo addSaleChance(SaleChance saleChance, HttpServletRequest request) {
- //从cookie中获取当前登录的userName
- String userName = CookieUtil.getCookieValue(request, "userName");
- //设置创建人到saleChance对象中
- saleChance.setCreateMan(userName);
- //调用service层的添加方法
- saleChanceService.addSaleChance(saleChance);
- return success("添加成功");
- }
-
- /**
- * 打开添加或者修改页面
- * @return
- */
- @RequestMapping("/toSaleChancePage")
- public String toSaleChancePage(Integer saleChanceId, HttpServletRequest request) {
- //判断saleChanceId是否为空
- if(saleChanceId != null) {
- //通过id查询
- SaleChance saleChance = saleChanceService.selectByPrimaryKey(saleChanceId);
- //将数据设置到request域中
- request.setAttribute("saleChance",saleChance);
- }
- return "saleChance/add_update";
- }
-
- /**
- * 修改操作 101004
- * @param saleChance
- * @return
- */
- @RequiredPermission(code = "101004")
- @PostMapping("/update")
- @ResponseBody
- public ResultInfo updateSaleChance(SaleChance saleChance) {
- //调用service层的添加方法
- saleChanceService.updateSaleChance(saleChance);
- return success("更新成功");
- }
-
- /**
- * 批量删除操作 101003
- * @param ids
- * @return
- */
- @RequiredPermission(code = "101003")
- @PostMapping("/delete")
- @ResponseBody
- public ResultInfo deleteSalChance(Integer[] ids) {
- saleChanceService.deleteSaleChance(ids);
- return success("删除成功");
- }
-
- /**
- * 修改营销机会的开发状态
- * @param id
- * @param devResult
- * @return
- */
- @PostMapping("/updateSaleChanceDevResult")
- @ResponseBody
- public ResultInfo updateSaleChanceDevResult(Integer id,Integer devResult) {
- saleChanceService.updateSaleChanceDevResult(id,devResult);
- return success("开发状态更新成功");
- }
-
- }
- package com.xxxx.crm.controller;
-
- import com.xxxx.crm.base.BaseController;
- import com.xxxx.crm.base.ResultInfo;
- import com.xxxx.crm.model.UserModel;
- import com.xxxx.crm.query.UserQuery;
- import com.xxxx.crm.service.UserService;
- import com.xxxx.crm.utils.LoginUserUtil;
- import com.xxxx.crm.vo.User;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.*;
-
- import javax.annotation.Resource;
- import javax.servlet.http.HttpServletRequest;
- import java.util.List;
- import java.util.Map;
-
- @Controller
- @RequestMapping("/user")
- public class UserController extends BaseController {
-
- @Resource
- private UserService userService;
-
- /**
- * 用户登录
- * @param userName
- * @param userPwd
- * @return
- */
- @PostMapping("/login")
- @ResponseBody
- public ResultInfo userLogin(String userName, String userPwd) {
- ResultInfo resultInfo = new ResultInfo();
- //调用service层的登录方法
- UserModel userModel = userService.userLogin(userName, userPwd);
- //设置ResultInfo的result值(将数据返回给请求)
- resultInfo.setResult(userModel);
- return resultInfo;
- }
-
- /**
- * 修改密码
- * @param request
- * @param oldPassword
- * @param newPassword
- * @param repeatPassword
- * @return
- */
- @PostMapping("/updatePwd")
- @ResponseBody
- public ResultInfo updateUserPassword(HttpServletRequest request, String oldPassword,
- String newPassword, String repeatPassword) {
- ResultInfo resultInfo = new ResultInfo();
- //获取cookie中的用户id
- Integer userId = LoginUserUtil.releaseUserIdFromCookie(request);
- //调用service层的修改密码方法
- userService.updatePassword(userId, oldPassword, newPassword, repeatPassword);
- return resultInfo;
- }
-
- /**
- * 打开修改密码页面
- * @return
- */
- @RequestMapping("/toPasswordPage")
- public String toPasswordPage() {
- return "user/password";
- }
-
- /**
- * 打开基本资料页面
- * @return
- */
- @RequestMapping("/toSettingPage")
- public String toSettingPage(HttpServletRequest request) {
- //获取cookie中的用户id
- Integer userId = LoginUserUtil.releaseUserIdFromCookie(request);
- User user = userService.selectByPrimaryKey(userId);
- request.setAttribute("user",user);
- return "user/info";
- }
-
- /**
- * 查询所有的销售人员
- * @return
- */
- @RequestMapping("/queryAllSales")
- @ResponseBody
- public List<Map<String,Object>> queryAllSales() {
- return userService.queryAllSales();
- }
-
- /**
- * 分页条件查询用户列表
- * @param userQuery
- * @return
- */
- @RequestMapping("/list")
- @ResponseBody
- public Map<String,Object> selectByParams(UserQuery userQuery) {
- return userService.queryByParamsForTable(userQuery);
- }
-
- /**
- * 打开用户列表页面
- * @return
- */
- @RequestMapping("/index")
- public String index() {
- return "user/user";
- }
-
- /**
- * 添加操作
- * @param user
- * @return
- */
- @PostMapping("/add")
- @ResponseBody
- public ResultInfo addUser(User user) {
- userService.addUser(user);
- return success("添加成功");
- }
-
- /**
- * 打开添加或修改页面
- * @return
- */
- @RequestMapping("/toAddOrUpdateUserPage")
- public String toAddOrUpdateUserPage(Integer id,HttpServletRequest request) {
- if(id != null) {
- User user = userService.selectByPrimaryKey(id);
- request.setAttribute("userInfo",user);
- }
- return "user/add_update";
- }
-
- /**
- * 修改操作
- * @param user
- * @return
- */
- @PostMapping("/update")
- @ResponseBody
- public ResultInfo updateUser(User user) {
- userService.updateUser(user);
- return success("修改成功");
- }
-
- /**
- * 删除操作
- * @param ids
- * @return
- */
- @PostMapping("/delete")
- @ResponseBody
- public ResultInfo deleteUser(Integer[] ids) {
- userService.deleteUser(ids);
- return success("删除成功");
- }
-
- /**
- * 查询所有的客户经理
- * @return
- */
- @GetMapping("/queryAllCustomerManagers")
- @ResponseBody
- public List<Map<String,Object>> queryAllCustomerManagers() {
- return userService.queryAllCustomerManagers();
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。