Commit 53206998 by Shadow

fixed bug

parent 9ff49d29
...@@ -123,7 +123,7 @@ public interface ImClientService extends BaseService<ImClient> { ...@@ -123,7 +123,7 @@ public interface ImClientService extends BaseService<ImClient> {
* @return * @return
* @throws Exception * @throws Exception
*/ */
boolean deleteImClient( Long id) throws Exception; boolean deleteImClient(Long id);
/** /**
* 获取分页对象 * 获取分页对象
......
...@@ -63,6 +63,7 @@ import com.wecloud.im.service.ImClientService; ...@@ -63,6 +63,7 @@ import com.wecloud.im.service.ImClientService;
import com.wecloud.im.vo.ClientInfoVo; import com.wecloud.im.vo.ClientInfoVo;
import com.wecloud.im.vo.GetInfoListVo; import com.wecloud.im.vo.GetInfoListVo;
import com.wecloud.im.vo.MyInfoVo; import com.wecloud.im.vo.MyInfoVo;
import com.wecloud.im.ws.utils.RedisUtils;
import com.wecloud.utils.SnowflakeUtil; import com.wecloud.utils.SnowflakeUtil;
/** /**
...@@ -94,6 +95,9 @@ public class ImClientServiceImpl extends BaseServiceImpl<ImClientMapper, ImClien ...@@ -94,6 +95,9 @@ public class ImClientServiceImpl extends BaseServiceImpl<ImClientMapper, ImClien
@Autowired @Autowired
private ContextService contextService; private ContextService contextService;
@Autowired
private RedisUtils redisUtils;
@Override @Override
public MyInfoVo getMyInfo() { public MyInfoVo getMyInfo() {
ImClient currentClient = contextService.getImClientIfNotNullOrThrow(); ImClient currentClient = contextService.getImClientIfNotNullOrThrow();
...@@ -274,7 +278,7 @@ public class ImClientServiceImpl extends BaseServiceImpl<ImClientMapper, ImClien ...@@ -274,7 +278,7 @@ public class ImClientServiceImpl extends BaseServiceImpl<ImClientMapper, ImClien
} }
@Override @Override
public boolean deleteImClient(Long id) throws Exception { public boolean deleteImClient(Long id) {
return super.removeById(id); return super.removeById(id);
} }
...@@ -395,7 +399,9 @@ public class ImClientServiceImpl extends BaseServiceImpl<ImClientMapper, ImClien ...@@ -395,7 +399,9 @@ public class ImClientServiceImpl extends BaseServiceImpl<ImClientMapper, ImClien
throw new BusinessException("用户不存在"); throw new BusinessException("用户不存在");
} }
targetClient.setAttributes(JSONObject.toJSONString(attributes)); targetClient.setAttributes(JSONObject.toJSONString(attributes));
deleteCacheImClient(appId, userId); // 清除client的redis缓存
redisUtils.delKey(targetClient.getId() + "");
redisUtils.delKey(targetClient.getFkAppid() + targetClient.getClientId());
return this.updateById(targetClient); return this.updateById(targetClient);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment