浏览代码

UpdateWorkByUser

xf 2 年之前
父节点
当前提交
8c8aec0046
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 1
      src/CallCenter.Api/Realtimes/CallCenterHub.cs
  2. 1 0
      src/CallCenter/Caches/UserCacheManager.cs

+ 1 - 1
src/CallCenter.Api/Realtimes/CallCenterHub.cs

@@ -34,7 +34,7 @@ public class CallCenterHub : Hub
         work.SignalRId = Context.ConnectionId;
         await _workRepository.UpdateAsync(work, Context.ConnectionAborted);
         _userCacheManager.UpdateWorkByUser(work);
-        _userCacheManager.UpdateWorksCache(work);
+        //_userCacheManager.UpdateWorksCache(work);
         await base.OnConnectedAsync();
     }
 

+ 1 - 0
src/CallCenter/Caches/UserCacheManager.cs

@@ -165,6 +165,7 @@ public class UserCacheManager : IUserCacheManager, IScopeDependency
     public void UpdateWorkByUser(Work work)
     {
         _cacheWork.Update(Work.GetKey(KeyMode.UserId, work.UserId), d => work);
+        _cacheWork.Update(Work.GetKey(KeyMode.TelNo, work.TelNo), d => work);
     }