Showing
1 changed file
with
8 additions
and
0 deletions
1 | 1 | package org.thingsboard.server.common.data.yunteng.utils.tools; |
2 | +import org.thingsboard.server.common.data.StringUtils; | |
3 | + | |
2 | 4 | import java.time.LocalDateTime; |
3 | 5 | import java.util.HashMap; |
4 | 6 | import java.util.Iterator; |
... | ... | @@ -28,6 +30,12 @@ public class VideoUrlUtils { |
28 | 30 | //如果过期了返回null |
29 | 31 | return nowTime.isAfter(expireTime) ? null : videoUrlInfo.get("url").toString(); |
30 | 32 | } |
33 | + | |
34 | + public static void clearVideoUrlData(String key){ | |
35 | + if(null != videoUrlData && !videoUrlData.isEmpty() && !StringUtils.isEmpty(key)){ | |
36 | + videoUrlData.remove(key); | |
37 | + } | |
38 | + } | |
31 | 39 | private static void checkVideoUrlData(){ |
32 | 40 | if(!videoUrlData.isEmpty()){ |
33 | 41 | Iterator<Map.Entry<String, Map<String, Object>>> iterator = videoUrlData.entrySet().iterator(); | ... | ... |