@@ -48,13 +48,13 @@ public class RouteController implements RouteApi {
48
48
@ Resource
49
49
private MetaStore metaStore ;
50
50
51
- @ Autowired
51
+ @ Resource
52
52
private AccountService accountService ;
53
53
54
- @ Autowired
54
+ @ Resource
55
55
private UserInfoCacheService userInfoCacheService ;
56
56
57
- @ Autowired
57
+ @ Resource
58
58
private CommonBizService commonBizService ;
59
59
60
60
@ Resource
@@ -69,19 +69,18 @@ public BaseResponse<NULLBody> groupRoute(@RequestBody ChatReqVO groupReqVO) {
69
69
70
70
log .info ("msg=[{}]" , groupReqVO .toString ());
71
71
72
- //获取所有的推送列表
73
- Map <Long , CIMServerResVO > serverResVOMap = accountService .loadRouteRelated ();
74
- for (Map .Entry <Long , CIMServerResVO > cimServerResVOEntry : serverResVOMap .entrySet ()) {
75
- Long userId = cimServerResVOEntry .getKey ();
76
- CIMServerResVO cimServerResVO = cimServerResVOEntry .getValue ();
72
+ Map <Long , CIMServerResVO > serverResVoMap = accountService .loadRouteRelated ();
73
+ for (Map .Entry <Long , CIMServerResVO > cimServerResVoEntry : serverResVoMap .entrySet ()) {
74
+ Long userId = cimServerResVoEntry .getKey ();
75
+ CIMServerResVO cimServerResVO = cimServerResVoEntry .getValue ();
77
76
if (userId .equals (groupReqVO .getUserId ())) {
78
- //过滤掉自己
77
+ // Skip the sender
79
78
Optional <CIMUserInfo > cimUserInfo = userInfoCacheService .loadUserInfoByUserId (groupReqVO .getUserId ());
80
- cimUserInfo .ifPresent (userInfo -> log .warn ("过滤掉了发送者 userId={}" , userInfo . toString () ));
79
+ cimUserInfo .ifPresent (userInfo -> log .warn ("skip send user userId={}" , userInfo ));
81
80
continue ;
82
81
}
83
82
84
- //推送消息
83
+ // Push message
85
84
ChatReqVO chatVO = new ChatReqVO (userId , groupReqVO .getMsg ());
86
85
accountService .pushMsg (cimServerResVO , groupReqVO .getUserId (), chatVO );
87
86
0 commit comments