Commit 53206998 by Shadow

fixed bug

parent 9ff49d29
......@@ -123,7 +123,7 @@ public interface ImClientService extends BaseService<ImClient> {
* @return
* @throws Exception
*/
boolean deleteImClient( Long id) throws Exception;
boolean deleteImClient(Long id);
/**
* 获取分页对象
......
......@@ -63,6 +63,7 @@ import com.wecloud.im.service.ImClientService;
import com.wecloud.im.vo.ClientInfoVo;
import com.wecloud.im.vo.GetInfoListVo;
import com.wecloud.im.vo.MyInfoVo;
import com.wecloud.im.ws.utils.RedisUtils;
import com.wecloud.utils.SnowflakeUtil;
/**
......@@ -94,6 +95,9 @@ public class ImClientServiceImpl extends BaseServiceImpl<ImClientMapper, ImClien
@Autowired
private ContextService contextService;
@Autowired
private RedisUtils redisUtils;
@Override
public MyInfoVo getMyInfo() {
ImClient currentClient = contextService.getImClientIfNotNullOrThrow();
......@@ -274,7 +278,7 @@ public class ImClientServiceImpl extends BaseServiceImpl<ImClientMapper, ImClien
}
@Override
public boolean deleteImClient(Long id) throws Exception {
public boolean deleteImClient(Long id) {
return super.removeById(id);
}
......@@ -395,7 +399,9 @@ public class ImClientServiceImpl extends BaseServiceImpl<ImClientMapper, ImClien
throw new BusinessException("用户不存在");
}
targetClient.setAttributes(JSONObject.toJSONString(attributes));
deleteCacheImClient(appId, userId);
// 清除client的redis缓存
redisUtils.delKey(targetClient.getId() + "");
redisUtils.delKey(targetClient.getFkAppid() + targetClient.getClientId());
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