|
@@ -85,8 +85,6 @@ public class TencentYunServiceImpl extends ServiceImpl<ITencentYunMapper, Tencen
|
|
|
if(roleMap.get(roleId) == null){
|
|
|
throw new BusinessException(ResultCode.AGO_ROLE_ERROR);
|
|
|
}
|
|
|
- String redisKey = String.format(RedisKeyUtil.AGORA_KEY ,channelName,roleId,userId);
|
|
|
- if (!redisUtil.hasKey(redisKey)) {
|
|
|
List<TencentYun> list = this.getByType(1);
|
|
|
if(list == null || list.size() <=0){
|
|
|
throw new BusinessException(ResultCode.TENCENT_YUN_EMPTY);
|
|
@@ -104,12 +102,7 @@ public class TencentYunServiceImpl extends ServiceImpl<ITencentYunMapper, Tencen
|
|
|
jsonObject.put("expire",tencentYun.getExTime());
|
|
|
jsonObject.put("sign",result);
|
|
|
jsonObject.put("operatorType",tencentYun.getOperatorType());
|
|
|
- redisUtil.set(redisKey ,jsonObject.toJSONString(),tencentYun.getExTime() - 60);
|
|
|
return jsonObject;
|
|
|
- }
|
|
|
- JSONObject jsonObject = JSONObject.parseObject(redisUtil.get(redisKey));
|
|
|
- jsonObject.put("expire",redisUtil.getExpire(redisKey));
|
|
|
- return jsonObject;
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|