|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.wms.common.constant; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public class RedisConstants { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static final String CACHE_DATA = "CACHE_DATA"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static final String STATISTICS_CACHE_DATA = "STATISTICS_CACHE_DATA"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static String getCacheKey(String prefix, String[] tables, String uri, String md5, Long roleId) { | 
|---|
|  |  |  | String tablesStr = ""; | 
|---|
|  |  |  | if (tables != null) { | 
|---|
|  |  |  | tablesStr = String.join(";", tables); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String roleKey = "roleId:" + roleId.toString(); | 
|---|
|  |  |  | String key = prefix + ":" + roleKey + ":" + tablesStr + ":" + uri + ":" + md5; | 
|---|
|  |  |  | return key; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | package com.zy.asrs.wms.common.constant; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public class RedisConstants { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static final String CACHE_DATA = "CACHE_DATA"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static final String STATISTICS_CACHE_DATA = "STATISTICS_CACHE_DATA"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static String getCacheKey(String prefix, String[] tables, String uri, String md5, Long roleId) { | 
|---|
|  |  |  | String tablesStr = ""; | 
|---|
|  |  |  | if (tables != null) { | 
|---|
|  |  |  | tablesStr = String.join(";", tables); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String roleKey = "roleId:" + roleId.toString(); | 
|---|
|  |  |  | String key = prefix + ":" + roleKey + ":" + tablesStr + ":" + uri + ":" + md5; | 
|---|
|  |  |  | return key; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|