|
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
import shop.alien.entity.store.LifeBlacklist;
|
|
@@ -31,10 +32,14 @@ import java.util.stream.Collectors;
|
|
|
@ServerEndpoint(value = "/socket/{sendId}")
|
|
|
public class WebSocketProcess {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private LifeMessageMapper lifeMessageMapper;
|
|
|
|
|
|
- private final LifeMessageMapper lifeMessageMapper = SpringContext.getBean(LifeMessageMapper.class);
|
|
|
- private final BaseRedisService baseRedisService = SpringContext.getBean(BaseRedisService.class);
|
|
|
- private final LifeBlacklistMapper lifeBlacklistMapper = SpringContext.getBean(LifeBlacklistMapper.class);
|
|
|
+ @Autowired
|
|
|
+ private BaseRedisService baseRedisService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private LifeBlacklistMapper lifeBlacklistMapper;
|
|
|
|
|
|
/*
|
|
|
* 持有每个webSocket对象,以key-value存储到线程安全ConcurrentHashMap,
|