package com.xcong.excoin.netty.logic.impl; import cn.hutool.core.util.StrUtil; import com.xcong.excoin.netty.bean.RequestBean; import com.xcong.excoin.netty.common.ChannelManager; import com.xcong.excoin.netty.common.Contans; import com.xcong.excoin.netty.common.NettyTools; import com.xcong.excoin.netty.logic.MsgLogic; import com.xcong.excoin.netty.logic.WebSocketLogic; import io.netty.channel.Channel; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** * @author wzy * @date 2019-05-09 */ @Component public class MsgLogicImpl implements MsgLogic { @Autowired private WebSocketLogic webSocketLogic; @Override public void webSocketMsgLogic(RequestBean requestBean) { switch (requestBean.getType()) { case Contans.AUTH_CHECK: webSocketLogic.authCheck(requestBean); break; case Contans.MESSAGE: webSocketLogic.sendMsg(requestBean); default: break; } } }