| | |
| | | return onlineMap; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean checkOnline(String userId) { |
| | | RongCloudParam param = new RongCloudParam(); |
| | | param.setUserId(userId); |
| | | Map isOnline = rongCloudClient.checkOnline(getRongCloudHead(), param); |
| | | if (isOnline.get("status").equals("1")) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取融云签名信息 |
| | | */ |
| | |
| | | String nonce = RandomStringUtils.randomNumeric(18); |
| | | String timestamp = String.valueOf(new Date().getTime()); |
| | | String signature = DigestUtils.sha1Hex(appSecret + nonce + timestamp);//App Secret + Nonce + T |
| | | Map<String, Object> headerMap=new HashMap<>(); |
| | | headerMap.put("App-Key",appKey); |
| | | headerMap.put("Nonce",nonce); |
| | | headerMap.put("Timestamp",timestamp); |
| | | headerMap.put("Signature",signature); |
| | | Map<String, Object> headerMap = new HashMap<>(); |
| | | headerMap.put("App-Key", appKey); |
| | | headerMap.put("Nonce", nonce); |
| | | headerMap.put("Timestamp", timestamp); |
| | | headerMap.put("Signature", signature); |
| | | return headerMap; |
| | | } |
| | | } |