| | |
| | | package com.ycl.jxkg.server; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.google.gson.JsonObject; |
| | | import com.ycl.jxkg.domain.entity.Message; |
| | | import com.ycl.jxkg.domain.query.WebSocketQuery; |
| | | import com.ycl.jxkg.domain.vo.WebsocketDataVO; |
| | | import com.ycl.jxkg.enums.WebsocketCommendEnum; |
| | | import com.ycl.jxkg.service.EducationResourceService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.servlet.http.HttpSession; |
| | | import javax.websocket.OnClose; |
| | | import javax.websocket.OnMessage; |
| | | import javax.websocket.OnOpen; |
| | |
| | | EducationResourceService educationResourceService = applicationContext.getBean(EducationResourceService.class); |
| | | educationResourceService.recordTime(userId); |
| | | } |
| | | // 会议操作 |
| | | if (WebsocketCommendEnum.MUTE.getCommand().equals(command) || WebsocketCommendEnum.OPEN_CAMERA.getCommand().equals(command) || WebsocketCommendEnum.KICK_OUT.getCommand().equals(command)) { |
| | | WebsocketDataVO websocketDataVO = new WebsocketDataVO(); |
| | | websocketDataVO.setCommend(command); |
| | | sendOneMessage(userId, JSON.toJSONString(websocketDataVO)); |
| | | } |
| | | log.info("【WebSocket消息】收到客户端消息:" + message); |
| | | } |
| | | |