亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Java 實(shí)戰(zhàn)項(xiàng)目之CRM客戶管理系統(tǒng)的實(shí)現(xiàn)流程

 更新時(shí)間:2021年11月15日 14:59:27   作者:qq_1334611189  
讀萬卷書不如行萬里路,只學(xué)書上的理論是遠(yuǎn)遠(yuǎn)不夠的,只有在實(shí)戰(zhàn)中才能獲得能力的提升,本篇文章手把手帶你用java+SSM+jsp+mysql+maven實(shí)現(xiàn)一個(gè)CRM客戶管理系統(tǒng),大家可以在過程中查缺補(bǔ)漏,提升水平

一、項(xiàng)目簡述

功能包括: 用戶管理,系統(tǒng)管理,客戶管理,客戶服務(wù),客戶關(guān)懷, 銷售機(jī)會(huì),統(tǒng)計(jì)管理等等。

二、項(xiàng)目運(yùn)行

環(huán)境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)

項(xiàng)目技術(shù): JSP +Spring + SpringMVC + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等。

員工操作:

/**
 * @author 員工操作
 */
@RestController
@RequestMapping("/employee")
@CrossOrigin
@Slf4j
public class EmployeeController {
    @Autowired
    private EmployeeService employeeService;
    @Autowired
    private DepartmentService departmentService;
    @Autowired
    private JobService jobService;
    @Autowired
    private EduLevelMapper eduLevelMapper;
    @Autowired
    private EmployeeMapper employeeMapper;
    /**
     * 搜索接口
     */
    @GetMapping("/search")
    public Result search(@RequestParam(name = "name", required = false,defaultValue = "") String name,
                         @RequestParam(name = "current", required = false, defaultValue = "1") Integer current,
                         @RequestParam(name = "size", required = false, defaultValue = "10") Integer size) {
        return employeeService.list(current, size, name);
    }
 
    /**
     * 分頁查詢接口
     *
     * @param current
     * @param size
     * @return
     */
    @GetMapping("/list")
    public Result list(@RequestParam(name = "current", required = false, defaultValue = "1") Integer current,
                       @RequestParam(name = "size", required = false, defaultValue = "10") Integer size) {
        return employeeService.list(current, size, null);
    }
 
    /**
     * 根據(jù)id獲取員工具體信息
     * @param id
     * @return
     */
    @GetMapping("/getUserById")
    public EmployeeDTO getUserAllInfoById(@RequestParam(name = "id") Integer id) {
        return employeeService.getUserById(id);
    }
 
    /**
     * 根據(jù)員工獲取信息
     * @param id
     * @return
     */
    @GetMapping("/getEmployeeById")
    public Employee getUserById(@RequestParam(name = "id") Integer id) {
        return employeeMapper.selectById(id);
    }
    /**
     * 增加員工接口
     *
     * @param employee
     * @return
     */
    @PostMapping("/add")
    public Map<String, Object> addUser(@RequestBody Employee employee) {
        log.info(employee.toString());
        return employeeService.add(employee);
    }
 
    /**
     * 更新用戶
     * @param employee
     * @return
     */
    @PostMapping("/update")
    public Map<String, Object> updateUser(@RequestBody Employee employee) {
        log.info(employee.toString());
        return employeeService.update(employee);
    }
 
    /**
     * 刪除用戶
     * @param id
     * @return
     */
    @GetMapping("/delete")
    public Result deleteEmployeeById(@RequestParam(name = "id") Integer id) {
        return employeeService.deleteEmployeeById(id);
    }
 
    /**
     * 辭退員工
     *
     * @param id
     * @return
     */
    @GetMapping("/dismiss")
    public Map<String, Object> dismissEmployeeById(@RequestParam(name = "id") Integer id) {
        return employeeService.dismissEmployeeById(id);
    }
 
    /**
     * 得到所以工作,部門,學(xué)歷信息
     *
     * @return
     */
    @GetMapping("/otherInfo")
    public Result getAllOtherInfo() {
        Map<String, Object> info = new HashMap<>();
        info.put("departments", departmentService.selectAll());
        info.put("jobs", jobService.selectAll());
        info.put("eduLevels", eduLevelMapper.selectList(null));
        return Result.success(info);
    }
 
    @GetMapping("/map")
    public Result getMap() {
        return employeeService.getMap();
    }
}

人事管理相關(guān)接口:

/**
 * 人事管理相關(guān)接口
 */
@RestController
@CrossOrigin
@RequestMapping("/personnel")
public class PersonnelController {
    @Autowired
    private PersonnelService personnelService;
 
    /**
     * 所以人事記錄接口
     * @param current
     * @param size
     * @return
     */
    @GetMapping("/list")
    public Result list(@RequestParam(name = "current", required = false, defaultValue = "1") Integer current,
                       @RequestParam(name = "size", required = false, defaultValue = "10") Integer size) {
        return personnelService.list(current, size);
    }
 
 
}

服務(wù)端:

/**
 * websocket 服務(wù)端
 * 注意: websocket 不能被代理,還有下面幾個(gè)注解修飾的方法必須是public的
 */
 
@Component
@ServerEndpoint("/websocket/login")
@Slf4j
public class WebSocketServer {
//    static Log log = LogFactory.get(WebSocketServer.class);
    /**
     * 記錄連接數(shù)量
     */
    private static int onlineCount = 0;
    /**
     * juc中的線程安全容器
     */
    private static CopyOnWriteArraySet<WebSocketServer> webSocketSet = new CopyOnWriteArraySet<>();
    /**
     * 存放websocket 中的會(huì)話
     */
    private Session session;
 
    /**
     * 連接建立成功調(diào)用的方法
     */
    @OnOpen
    public void onOpen(Session session) {
        this.session = session;
        webSocketSet.add(this);
        addOnlineCount();
        log.info("新增一個(gè)websocket連接,現(xiàn)在連接數(shù)" + getOnlineCount());
    }
 
    /**
     * websocket 連接斷開調(diào)用的方法
     */
    @OnClose
    public void onClose() {
        webSocketSet.remove(this);
        subOnlineCount();
        log.info("斷開websocket一個(gè)連接,現(xiàn)在連接數(shù):" + getOnlineCount());
    }
 
    /**
     * 收到消息調(diào)用此方法
     *
     * @param message
     * @param session
     */
    @OnMessage
    public void onMessage(String message, Session session) {
        log.info("websocket 收到消息了: " + message);
        try {
            sendInfo("hello, too!!!", "text");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
 
    /**
     * 發(fā)生錯(cuò)誤調(diào)用的方法
     *
     * @param session
     * @param throwable
     */
    @OnError
    public void onError(Session session, Throwable throwable) {
        log.error("發(fā)送錯(cuò)誤,  ");
        throwable.printStackTrace();
    }
 
    /**
     * 實(shí)現(xiàn)主動(dòng)推送消息到客戶端
     */
    public void sendMessage(String message) throws IOException {
        if (session != null) {
            this.session.getBasicRemote().sendText(message);
        } else {
            log.info("session為空");
        }
    }
 
    public static void sendInfo(Object message, String type) throws IOException {
        log.info("推送消息到窗口,推送內(nèi)容:" + message);
        Map<String, Object> resultMap = new HashMap<>();
        resultMap.put("type", type);
        resultMap.put("message", message);
        JSONObject jsonObject = JSONUtil.parseObj(resultMap);
        for (WebSocketServer item : webSocketSet) {
            try {
                //這里可以設(shè)定只推送給這個(gè)sid的,為null則全部推送
                item.sendMessage(jsonObject.toString());
            } catch (IOException e) {
                continue;
            }
        }
    }
 
    public static synchronized int getOnlineCount() {
        return onlineCount;
    }
 
    public static synchronized void addOnlineCount() {
        WebSocketServer.onlineCount++;
    }
 
    public static synchronized void subOnlineCount() {
        WebSocketServer.onlineCount--;
    }
}

以上就是Java 實(shí)戰(zhàn)項(xiàng)目之CRM客戶管理系統(tǒng)的實(shí)現(xiàn)流程的詳細(xì)內(nèi)容,更多關(guān)于Java CRM客戶管理系統(tǒng)的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

  • java讀取證書公鑰的實(shí)現(xiàn)

    java讀取證書公鑰的實(shí)現(xiàn)

    這篇文章主要介紹了java讀取證書公鑰的實(shí)現(xiàn),具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧
    2021-01-01
  • SpringBoot開發(fā)案例之打造私有云網(wǎng)盤的實(shí)現(xiàn)

    SpringBoot開發(fā)案例之打造私有云網(wǎng)盤的實(shí)現(xiàn)

    這篇文章主要介紹了SpringBoot開發(fā)案例之打造私有云網(wǎng)盤的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-04-04
  • Mybatis加載策略的實(shí)現(xiàn)方法

    Mybatis加載策略的實(shí)現(xiàn)方法

    Mybatis中一對(duì)一,一對(duì)多,多對(duì)多關(guān)系的配置及實(shí)現(xiàn),可以實(shí)現(xiàn)對(duì)象的關(guān)聯(lián)查詢。實(shí)際開發(fā)過程中很多時(shí)候我們并不需要總是在加載用戶信息時(shí)就一定要加載他的訂單信息,這是就是我們常說的延時(shí)加載,本文給大家詳細(xì)介紹實(shí)現(xiàn)方法,一起看看吧
    2022-02-02
  • 基于TCP通信丟包原因總結(jié)(推薦)

    基于TCP通信丟包原因總結(jié)(推薦)

    下面小編就為大家?guī)硪黄赥CP通信丟包原因總結(jié)(推薦)。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2017-08-08
  • springboot+thymeleaf+mybatis實(shí)現(xiàn)甘特圖的詳細(xì)過程

    springboot+thymeleaf+mybatis實(shí)現(xiàn)甘特圖的詳細(xì)過程

    這篇文章主要介紹了springboot+thymeleaf+mybatis實(shí)現(xiàn)甘特圖的詳細(xì)過程,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2021-07-07
  • 詳解SpringMVC攔截器(資源和權(quán)限管理)

    詳解SpringMVC攔截器(資源和權(quán)限管理)

    本篇文章主要介紹了SpringMVC攔截器(資源和權(quán)限管理),具有一定的參考價(jià)值,有興趣的可以了解一下。
    2016-12-12
  • mybatis使用pageHelper插件進(jìn)行查詢分頁

    mybatis使用pageHelper插件進(jìn)行查詢分頁

    這篇文章主要介紹了mybatis使用pageHelper插件進(jìn)行查詢分頁,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2018-08-08
  • 鴻蒙HarmonyOS App開發(fā)造輪子之自定義圓形圖片組件的實(shí)例代碼

    鴻蒙HarmonyOS App開發(fā)造輪子之自定義圓形圖片組件的實(shí)例代碼

    這篇文章主要介紹了鴻蒙HarmonyOS App開發(fā)造輪子之自定義圓形圖片組件,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2021-01-01
  • Mybatis中#{}和${}傳參的區(qū)別及#和$的區(qū)別小結(jié)

    Mybatis中#{}和${}傳參的區(qū)別及#和$的區(qū)別小結(jié)

    這篇文章主要介紹了Mybatis中#{}和${}傳參的區(qū)別及#和$的區(qū)別小結(jié) 的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下
    2016-07-07
  • 淺談Java數(shù)據(jù)結(jié)構(gòu)之稀疏數(shù)組知識(shí)總結(jié)

    淺談Java數(shù)據(jù)結(jié)構(gòu)之稀疏數(shù)組知識(shí)總結(jié)

    今天帶大家了解一下Java稀疏數(shù)組的相關(guān)知識(shí),文中有非常詳細(xì)的介紹及代碼示例,對(duì)正在學(xué)習(xí)java的小伙伴們有很好地幫助,需要的朋友可以參考下
    2021-05-05

最新評(píng)論