mirror of
https://github.com/zongzibinbin/MallChat.git
synced 2026-03-14 06:03:42 +08:00
删除频控
This commit is contained in:
@@ -3,7 +3,6 @@ package com.abin.mallchat.common.user.service.impl;
|
|||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.abin.mallchat.common.common.annotation.FrequencyControl;
|
|
||||||
import com.abin.mallchat.common.common.config.ThreadPoolConfig;
|
import com.abin.mallchat.common.common.config.ThreadPoolConfig;
|
||||||
import com.abin.mallchat.common.common.constant.RedisKey;
|
import com.abin.mallchat.common.common.constant.RedisKey;
|
||||||
import com.abin.mallchat.common.common.event.UserOfflineEvent;
|
import com.abin.mallchat.common.common.event.UserOfflineEvent;
|
||||||
@@ -104,7 +103,6 @@ public class WebSocketServiceImpl implements WebSocketService {
|
|||||||
*/
|
*/
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
@Override
|
@Override
|
||||||
@FrequencyControl(time = 1000, count = 50, spEl = "T(com.abin.mallchat.common.websocket.NettyUtil).getAttr(#channel,T(com.abin.mallchat.common.websocket.NettyUtil).IP)")
|
|
||||||
public void handleLoginReq(Channel channel) {
|
public void handleLoginReq(Channel channel) {
|
||||||
//生成随机不重复的登录码,并将channel存在本地cache中
|
//生成随机不重复的登录码,并将channel存在本地cache中
|
||||||
Integer code = generateLoginCode(channel);
|
Integer code = generateLoginCode(channel);
|
||||||
|
|||||||
Reference in New Issue
Block a user