cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package cn.ksource.core.config;
 
import org.apache.commons.lang.StringUtils;
 
public class CacheKeyUtil {
 
    /**
     * 通用数据字典的缓存前缀
     */
    public final static String CACHE_KEY_DATADICTIONARY_KEY = "dic_";
    
    /**
     * 子系统缓存前缀
     */
    public final static String CACHE_KEY_Sub_System_KEY = "subsys_";
    
    /**
     * 区域数据字典缓存前缀
     */
    public final static String CACHE_KEY_AREA_KEY = "area_";
    /**
     * 区域列表数据字典缓存前缀
     */
    public final static String CACHE_KEY_AREA_List_KEY = "arealist_";
    
    /**
     * 接口数据字典缓存前缀
     */
    public final static String CACHE_KEY_Interface_KEY = "interface_";
    
    /**
     * 消息数据字典缓存前缀
     */
    public final static String CACHE_KEY_MessageQueue_KEY = "msg_";
    
    
    public static String getDataDictionaryCacheKey(String key){
        if (StringUtils.isBlank(key)) {
            return null;
        }
        return CACHE_KEY_DATADICTIONARY_KEY + key;
    }
    
    
    public static String getSubSystemCacheKey(String key){
        if (StringUtils.isBlank(key)) {
            return null;
        }
        return CACHE_KEY_Sub_System_KEY + key;
    }
    
    public static String getAreaCacheKey(String key){
        if (StringUtils.isBlank(key)) {
            return null;
        }
        return CACHE_KEY_AREA_KEY + key;
    }
    
    public static String getAreaListCacheKey(String key){
        if (StringUtils.isBlank(key)) {
            return null;
        }
        return CACHE_KEY_AREA_List_KEY + key;
    }
    
    public static String getInterfaceCacheKey(String key){
        if (StringUtils.isBlank(key)) {
            return null;
        }
        return CACHE_KEY_Interface_KEY + key;
    }
    
    public static String getMessageQueueCacheKey(String key){
        if (StringUtils.isBlank(key)) {
            return null;
        }
        return CACHE_KEY_MessageQueue_KEY + key;
    }
    
}