新增华为融合通信类型
This commit is contained in:
parent
8650856864
commit
090de658ff
@ -13,7 +13,8 @@ public enum WebSocketCustomTypeEnum {
|
|||||||
HUAWEI_RTC_CALL(11002, "华为实时通讯呼叫"),
|
HUAWEI_RTC_CALL(11002, "华为实时通讯呼叫"),
|
||||||
HUAWEI_RTC_CALL_LOGIN_SUCCESS(11201, "华为实时通讯呼叫登录成功"),
|
HUAWEI_RTC_CALL_LOGIN_SUCCESS(11201, "华为实时通讯呼叫登录成功"),
|
||||||
HUAWEI_RTC_CALL_NOT_SUPPORTED(11401, "华为实时通讯呼叫不支持"),
|
HUAWEI_RTC_CALL_NOT_SUPPORTED(11401, "华为实时通讯呼叫不支持"),
|
||||||
HUAWEI_RTC_CALL_LOGIN_FAILED(11402, "华为实时通讯呼叫登录失败");
|
HUAWEI_RTC_CALL_LOGIN_FAILED(11402, "华为实时通讯呼叫登录失败"),
|
||||||
|
HUAWEI_RTC_EXIT_LOGIN(11403, "退出登录");
|
||||||
|
|
||||||
private int value;
|
private int value;
|
||||||
private String summary;
|
private String summary;
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
package cn.com.tenlion.usercenter.service.websocket;
|
package cn.com.tenlion.usercenter.service.websocket;
|
||||||
|
|
||||||
import cn.com.tenlion.usercenter.enums.websocket.WebSocketCustomTypeEnum;
|
import cn.com.tenlion.usercenter.enums.websocket.WebSocketCustomTypeEnum;
|
||||||
import cn.com.tenlion.usercenter.service.userrealtimelocation.IUserRealtimeLocationService;
|
|
||||||
import cn.com.tenlion.usercenter.service.huaweirtc.IHuaweiRtcService;
|
import cn.com.tenlion.usercenter.service.huaweirtc.IHuaweiRtcService;
|
||||||
|
import cn.com.tenlion.usercenter.service.userrealtimelocation.IUserRealtimeLocationService;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.exceptions.websocket.BaseSocketException;
|
import ink.wgink.exceptions.websocket.BaseSocketException;
|
||||||
import ink.wgink.exceptions.websocket.CustomHandleException;
|
|
||||||
import ink.wgink.module.instantmessage.service.IWebSocketTextCustomService;
|
import ink.wgink.module.instantmessage.service.IWebSocketTextCustomService;
|
||||||
import ink.wgink.module.instantmessage.websocket.pojo.WebSocketClientMessage;
|
import ink.wgink.module.instantmessage.websocket.pojo.WebSocketClientMessage;
|
||||||
import ink.wgink.module.map.pojo.vos.userlocation.UserLocationVO;
|
import ink.wgink.module.map.pojo.vos.userlocation.UserLocationVO;
|
||||||
@ -31,21 +30,19 @@ public class WebSocketTextCustomServiceImpl extends DefaultBaseService implement
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(Channel fromChannel, WebSocketClientMessage webSocketClientMessage) throws BaseSocketException {
|
public void handle(Channel fromChannel, WebSocketClientMessage webSocketClientMessage) throws BaseSocketException {
|
||||||
try {
|
if (WebSocketCustomTypeEnum.LOCATION_REALTIME.getValue() == webSocketClientMessage.getType()) {
|
||||||
if (WebSocketCustomTypeEnum.LOCATION_REALTIME.getValue() == webSocketClientMessage.getType()) {
|
UserLocationVO userLocationVO = JSONObject.parseObject(webSocketClientMessage.getBody(), UserLocationVO.class);
|
||||||
UserLocationVO userLocationVO = JSONObject.parseObject(webSocketClientMessage.getBody(), UserLocationVO.class);
|
userRealtimeLocationService.save(userLocationVO);
|
||||||
userRealtimeLocationService.save(userLocationVO);
|
} else if (WebSocketCustomTypeEnum.HUAWEI_RTC_CALL.getValue() == webSocketClientMessage.getType()) {
|
||||||
} else if (WebSocketCustomTypeEnum.HUAWEI_RTC_CALL.getValue() == webSocketClientMessage.getType()) {
|
huaweiRtcService.rtcCall(webSocketClientMessage);
|
||||||
huaweiRtcService.rtcCall(webSocketClientMessage);
|
} else if (WebSocketCustomTypeEnum.HUAWEI_RTC_CALL_LOGIN_SUCCESS.getValue() == webSocketClientMessage.getType()) {
|
||||||
} else if (WebSocketCustomTypeEnum.HUAWEI_RTC_CALL_LOGIN_SUCCESS.getValue() == webSocketClientMessage.getType()) {
|
huaweiRtcService.rtcCall(webSocketClientMessage);
|
||||||
huaweiRtcService.rtcCall(webSocketClientMessage);
|
} else if (WebSocketCustomTypeEnum.HUAWEI_RTC_CALL_LOGIN_FAILED.getValue() == webSocketClientMessage.getType()) {
|
||||||
} else if (WebSocketCustomTypeEnum.HUAWEI_RTC_CALL_LOGIN_FAILED.getValue() == webSocketClientMessage.getType()) {
|
huaweiRtcService.rtcCall(webSocketClientMessage);
|
||||||
huaweiRtcService.rtcCall(webSocketClientMessage);
|
} else if (WebSocketCustomTypeEnum.HUAWEI_RTC_CALL_NOT_SUPPORTED.getValue() == webSocketClientMessage.getType()) {
|
||||||
} else if (WebSocketCustomTypeEnum.HUAWEI_RTC_CALL_NOT_SUPPORTED.getValue() == webSocketClientMessage.getType()) {
|
huaweiRtcService.rtcCall(webSocketClientMessage);
|
||||||
huaweiRtcService.rtcCall(webSocketClientMessage);
|
} else if (WebSocketCustomTypeEnum.HUAWEI_RTC_EXIT_LOGIN.getValue() == webSocketClientMessage.getType()) {
|
||||||
}
|
huaweiRtcService.rtcCall(webSocketClientMessage);
|
||||||
} catch (Exception e) {
|
|
||||||
throw new CustomHandleException(e.getMessage(), e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user