/// <summary> /// 修改用户状态 /// </summary> /// <param name="keyValue">主键值</param> /// <param name="State">状态:1-启动;0-禁用</param> public void UpdateState(string keyValue, int State) { try { InstanceDAL.UpdateState(keyValue, State); CacheFactory.Cache().RemoveCache(cacheKey); if (State == 0) { UpdateIMUserList(keyValue, false, null); } else { UserEntity entity = InstanceDAL.GetEntity(keyValue); UpdateIMUserList(keyValue, true, entity); } } catch (Exception) { throw; } }