基于ssm的客户管理系统
生活随笔
收集整理的這篇文章主要介紹了
基于ssm的客户管理系统
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
作者: IT學長,從事軟件開發 努力在IT搬磚路上的技術小白
公眾號: 【IT學長】,分享計算機類畢業設計源碼、IT技術文章、游戲源碼、網頁模板、程序人生等等。公眾號回復 【粉絲】進博主技術群,與大佬交流,領取干貨學習資料
關于轉載:歡迎轉載博主文章,轉載時表明出處
求贊環節:創作不易,記得 點贊+評論+轉發 謝謝你一路支持
查看更多系統:系統大全,課程設計、畢業設計,請點擊這里查看
文章目錄
- 查看更多系統:[系統大全,課程設計、畢業設計,請點擊這里查看](https://blog.csdn.net/qq_40625778/article/details/108213145)
- 01 概述
- 02 技術
- 03 運行環境
- 04 功能
- 05 運行截圖
- 客戶信息
- 跟進信息
- 登錄信息
- 權限管理
- 06 主要代碼
- 客戶信息
- 用戶登錄
- 07 源碼下載
- 運行
01 概述
一個簡單的客戶關系管理系統 管理用戶的基本數據 客戶的分配 客戶的流失 已經客戶的狀態
02 技術
ssm + jdk1.8 + mysql5.4
03 運行環境
ecplice + jdk1.8 + tomcat
04 功能
1- 字典管理
2- 用戶管理
3- 角色管理
4- 權限管理
5- 部門管理
6-客戶信息管理
7-數據添加-編輯-刪除
8-客戶信息的跟進
9-客戶信息狀態
05 運行截圖
客戶信息
跟進信息
登錄信息
權限管理
06 主要代碼
客戶信息
package com.controller;import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map;import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest;import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping;import com.dao.KhClientinfoMapper; import com.dao.KhHuiMapper; import com.dao.LogsMapper; import com.entity.KhClientinfo; import com.entity.KhHui; import com.entity.Logs; import com.util.Pagination;@Controller @RequestMapping("/khclient") public class KhClientinfoController extends BaseController{@Resource//客戶表KhClientinfoMapper khclientDao;@Resource//客戶跟進表KhHuiMapper khhuiDao;@ResourceLogsMapper logsDao;//客戶表顯示@RequestMapping("/show")public String show(Integer index,HttpServletRequest request) {int pageNO = 1;if(index!=null){pageNO = index;}String names = (String) request.getSession().getAttribute("name");String relo = (String) request.getSession().getAttribute("relo");Pagination pager = new Pagination();Map params = new HashMap();params.put("start", (pageNO-1)*40);params.put("pagesize", 40);if("客服".equals(relo)) {params.put("kefuname", names); }List all = khclientDao.show(params);pager.setData(all);pager.setIndex(pageNO);request.getSession().setAttribute("pageNO", pager.getIndex());pager.setPageSize(40);pager.setTotal(khclientDao.getTotal());pager.setPath("show.do?");request.setAttribute("pager", pager); return "client/cl-show";}//客戶表新建@RequestMapping(value = "/add")public String add(KhClientinfo data,HttpServletRequest request) {Date now = new Date();SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");//設置時間顯示格式String str = sdf.format(now);String names = (String) request.getSession().getAttribute("name");data.setKehuday(str);data.setKefuname(names);data.setKhstate("未到訪");Date time = null;if ("A:已交房客戶".equals(data.getKehulei())) {time= new Date(now.getTime() + (long)3 * 24 * 60 * 60 * 1000);//加3天 }if ("B:3個月內交房客戶".equals(data.getKehulei())) {time= new Date(now.getTime() + (long)7 * 24 * 60 * 60 * 1000);//加7天 }if ("C:3-6交房客戶".equals(data.getKehulei())) {time= new Date(now.getTime() + (long)15 * 24 * 60 * 60 * 1000);//加15天 }if ("D:6個月以上交房客戶".equals(data.getKehulei())) {time= new Date(now.getTime() + (long)30 * 24 * 60 * 60 * 1000);//加30天 }String stc = sdf.format(time); if (data.getKehutel().length()>1) {KhClientinfo khClient=khclientDao.tel(data.getKehutel());if (khClient!=null) {request.setAttribute("all", khClient.getKefuname());return "client/chongfu";}} khclientDao.insertSelective(data);KhClientinfo khClientinfo=khclientDao.isdn();KhHui khHui=new KhHui();khHui.setYuday(stc);khHui.setWenti("客戶第一次跟進"); khHui.setInid(khClientinfo.getId());khHui.setScday(str);khhuiDao.insertSelective(khHui);Integer pagerNO=(Integer)request.getSession().getAttribute("pageNO");return "redirect:/khclient/show?index="+pagerNO; }//客戶表刪除@RequestMapping("/{id}/del")public String del(@PathVariable("id") int id,HttpServletRequest request) {SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 時間字符串產生方式String uid = format.format(new Date());String names = (String) request.getSession().getAttribute("name");KhClientinfo khClientinfo=khclientDao.selectByPrimaryKey(id);Logs logs =new Logs();logs.setDay(uid);logs.setLoname(names);logs.setLei("刪除");logs.setBiaoid(khClientinfo.getKuhuname()+"+"+khClientinfo.getKehutel());logs.setBiao("客戶表及跟進詳情");logsDao.insertSelective(logs);khclientDao.deleteByPrimaryKey(id);Integer pagerNO=(Integer)request.getSession().getAttribute("pageNO");String like=request.getParameter("like");if (like!=null&&like.length()>0) {return "redirect:/khclient/like?index="+pagerNO;}else {return "redirect:/khclient/show?index="+pagerNO;}}//客戶表編輯前取數據@RequestMapping("/{id}/load")public String load(@PathVariable("id") int id,HttpServletRequest request, ModelMap model) {KhClientinfo record = (KhClientinfo) khclientDao.selectByPrimaryKey(id);model.addAttribute("record", record);String like=request.getParameter("like");if (like!=null) {request.setAttribute("like", like);}return "client/cl-modify";}//客戶表編輯@RequestMapping(value = "/update")public String update(KhClientinfo data,HttpServletRequest request) {khclientDao.updateByPrimaryKeySelective(data);Integer pagerNO=(Integer)request.getSession().getAttribute("pageNO");String like=request.getParameter("like");if (like!=null&&like.length()>0) {return "redirect:/khclient/like?index="+pagerNO;}else {return "redirect:/khclient/show?index="+pagerNO;}}//客戶表模糊查找@RequestMapping("/like")public String like(Integer index, KhClientinfo data,HttpServletRequest request) {int pageNO = 1;if(index!=null){pageNO = index;}Pagination pager = new Pagination();Map params = new HashMap();String lk=request.getParameter("lk");String names = (String) request.getSession().getAttribute("name");String relo = (String) request.getSession().getAttribute("relo");if (lk!=null&&lk.length()>0) {request.getSession().setAttribute("kuhuname",data.getKuhuname());request.getSession().setAttribute("kehuaddres",data.getKehuaddres());request.getSession().setAttribute("kehutel",data.getKehutel());request.getSession().setAttribute("kehulei",data.getKehulei());request.getSession().setAttribute("kehugenre",data.getKehugenre());request.getSession().setAttribute("kaiday",data.getKaiday());request.getSession().setAttribute("weixin",data.getWeixin());request.getSession().setAttribute("channel",data.getChannel());request.getSession().setAttribute("khstate",data.getKhstate());request.getSession().setAttribute("kefuname",data.getKefuname());request.getSession().setAttribute("kehuday",data.getKehuday());request.getSession().setAttribute("qu",data.getQu());request.getSession().setAttribute("an",data.getAn());request.getSession().setAttribute("jiename",data.getJiename());}String qu= (String) request.getSession().getAttribute("qu"); if(qu!=null&&qu.length()>0) {params.put("qu", qu);}String an= (String) request.getSession().getAttribute("an"); if(an!=null&&an.length()>0) {params.put("an", an);}String jiename= (String) request.getSession().getAttribute("jiename"); if(jiename!=null&&jiename.length()>0) {params.put("jiename", jiename);}String kaiday= (String) request.getSession().getAttribute("kaiday"); if(kaiday!=null&&kaiday.length()>0) {params.put("kaiday", kaiday);}String weixin= (String) request.getSession().getAttribute("weixin"); if(weixin!=null&&weixin.length()>0) {params.put("weixin", weixin);}String channel= (String) request.getSession().getAttribute("channel"); if(channel!=null&&channel.length()>0) {params.put("channel", channel);}String khstate= (String) request.getSession().getAttribute("khstate"); if(khstate!=null&&khstate.length()>0) {params.put("khstate", khstate);}String kehuday= (String) request.getSession().getAttribute("kehuday"); if(kehuday!=null&&kehuday.length()>0) {params.put("kehuday", kehuday);}String kuhuname= (String) request.getSession().getAttribute("kuhuname");if(kuhuname!=null&&kuhuname.length()>0) {params.put("kuhuname", kuhuname);}String kehuaddres= (String) request.getSession().getAttribute("kehuaddres"); if(kehuaddres!=null&&kehuaddres.length()>0) {params.put("kehuaddres", kehuaddres);} String kehugenre= (String) request.getSession().getAttribute("kehugenre"); if(kehugenre!=null&&kehugenre.length()>0) {params.put("kehugenre", kehugenre);}String kehulei= (String) request.getSession().getAttribute("kehulei"); if(kehulei!=null&&kehulei.length()>0) {params.put("kehulei", kehulei);}String kehutel= (String) request.getSession().getAttribute("kehutel"); if(kehutel!=null&&kehutel.length()>0) {params.put("kehutel", kehutel);} String kefuname= (String) request.getSession().getAttribute("kefuname"); if("客服".equals(relo)) {params.put("kefuname", names); }else {if(kefuname!=null&&kefuname.length()>0) {params.put("kefuname", kefuname);}}params.put("start", (pageNO-1)*40);params.put("pagesize",40);List all = khclientDao.like(params);pager.setData(all);pager.setIndex(pageNO);request.getSession().setAttribute("pageNO",pager.getIndex());pager.setPageSize(40);pager.setTotal(khclientDao.getlikeTotal(params));pager.setPath("like?");request.setAttribute("pager", pager);return "client/cl-showlike";} }用戶登錄
package com.controller;import java.util.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import com.dao.LogMapper; import com.dao.LogsMapper; import com.entity.Log; import com.util.Pagination;@Controller @RequestMapping("/log") public class LogController extends BaseController{@ResourceLogMapper logDao;@ResourceLogsMapper logsDao;//登錄信息顯示@RequestMapping("/show")public String show(Integer index,HttpServletRequest request,ModelMap model) {int pageNO = 1;if(index!=null){pageNO = index;}Pagination pager = new Pagination();Map params = new HashMap();params.put("start", (pageNO-1)*40);params.put("pagesize", 40);List all = logDao.show(params);pager.setData(all);pager.setIndex(pageNO);request.getSession().setAttribute("pageNO", pager.getIndex());pager.setPageSize(40);pager.setTotal(logDao.getTotal());pager.setPath("show.do?");request.setAttribute("pager", pager); return "dept/denlu/show";}//登錄信息模糊查找@RequestMapping("/like")public String like(Integer index, Log data,HttpServletRequest request) {int pageNO = 1;if(index!=null){pageNO = index;}Pagination pager = new Pagination();Map params = new HashMap();String lk=request.getParameter("lk");String account="";String onlineTime="";String exitTime="";if (lk!=null&&lk.length()>0) {request.getSession().setAttribute("account",data.getAccount());request.getSession().setAttribute("onlineTime",data.getOnlineTime());request.getSession().setAttribute("exitTime",data.getExitTime());}account=(String) request.getSession().getAttribute("account");onlineTime=(String) request.getSession().getAttribute("onlineTime");exitTime=(String) request.getSession().getAttribute("exitTime"); if(account!=null&&account.length()>0) {params.put("account",account);} if(onlineTime!=null&&onlineTime.length()>0) {params.put("onlineTime",onlineTime);}if(exitTime!=null&&exitTime.length()>0) {params.put("exitTime",exitTime);}params.put("start", (pageNO-1)*40);params.put("pagesize", 40);List all = logDao.like(params);pager.setData(all); pager.setIndex(pageNO);request.getSession().setAttribute("pageNO", pager.getIndex());pager.setPageSize(40);pager.setTotal(logDao.getlikeTotal(params));pager.setPath("like.do?");request.setAttribute("pager", pager); return "dept/denlu/show";}//個人操作記錄顯示@RequestMapping("/shows")public String shows(Integer index,HttpServletRequest request,ModelMap model) {int pageNO = 1;if(index!=null){pageNO = index;}Pagination pager = new Pagination();Map params = new HashMap();params.put("start", (pageNO-1)*40);params.put("pagesize", 40);List all = logsDao.show(params);pager.setData(all);pager.setIndex(pageNO);request.getSession().setAttribute("pageNO", pager.getIndex());pager.setPageSize(40);pager.setTotal(logsDao.getTotal());pager.setPath("shows.do?");request.setAttribute("pager", pager);return "dept/caozuo/show";} }07 源碼下載
關注公眾號【IT學長】,回復“基于ssm的客戶管理系統”免費領取。
亦可直接掃描主頁二維碼關注,回復“基于ssm的客戶管理系統”免費領取,點此打開個人主頁
運行
- 找到文件夾sql中的sql文件,導入到mysql中
- 將工程導入到eclipse中,修改數據庫連接信息
- 啟動項目,瀏覽器地址欄輸入:http://localhost:8080/ssmClient
說明:此源碼來源于網絡,若有侵權,請聯系刪除!!
總結
以上是生活随笔為你收集整理的基于ssm的客户管理系统的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 跨境电商指南:如何处理客户投诉
- 下一篇: 三人表决器程序c语言,“三人表决器”逻辑