|
@@ -1,27 +1,37 @@
|
|
package com.fdkankan.redis.constant;
|
|
package com.fdkankan.redis.constant;
|
|
|
|
|
|
-public class RedisKey {
|
|
|
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
+public class RedisKey {
|
|
/**
|
|
/**
|
|
* 过期时间:1分钟
|
|
* 过期时间:1分钟
|
|
*/
|
|
*/
|
|
- public static int EXPIRE_TIME_1_MINUTE = 1*60*1000;
|
|
|
|
|
|
+ public static final int EXPIRE_TIME_1_MINUTE = 60;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 过期时间:10分钟
|
|
* 过期时间:10分钟
|
|
*/
|
|
*/
|
|
- public static int EXPIRE_TIME_10_MINUTE = 10*60*1000;
|
|
|
|
|
|
+ public static final int EXPIRE_TIME_10_MINUTE = 10*60;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 过期时间:30分钟
|
|
* 过期时间:30分钟
|
|
*/
|
|
*/
|
|
- public static int EXPIRE_TIME_30_MINUTE = 30*60*1000;
|
|
|
|
|
|
+ public static final int EXPIRE_TIME_30_MINUTE = 30*60;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 过期时间:2小时
|
|
* 过期时间:2小时
|
|
*/
|
|
*/
|
|
- public static int EXPIRE_TIME_2_HOUR = 2*60*60*1000;
|
|
|
|
|
|
+ public static final int EXPIRE_TIME_2_HOUR = 2*60*60;
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 用户过期时间
|
|
|
|
+ */
|
|
|
|
+ public static final int USER_EXPIRE_TIME = 6*60*60;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 相机登陆7天有效期
|
|
|
|
+ */
|
|
|
|
+ public static final int CAMERA_EXPIRE_7_TIME = 7*24*60*60;
|
|
|
|
|
|
public static final String SYSTEM_PREFIX = "4dkankan";
|
|
public static final String SYSTEM_PREFIX = "4dkankan";
|
|
|
|
|
|
@@ -31,6 +41,10 @@ public class RedisKey {
|
|
public static String TOKEN_USER = "token:type:%s:name:%s";
|
|
public static String TOKEN_USER = "token:type:%s:name:%s";
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * ssouser key
|
|
|
|
+ */
|
|
|
|
+ public static String SSO_USER = "sso_user:name:%s";
|
|
|
|
+ /**
|
|
* 开发者信息
|
|
* 开发者信息
|
|
*/
|
|
*/
|
|
public static String TM_DEVELOPER = "developer:appid:%s";
|
|
public static String TM_DEVELOPER = "developer:appid:%s";
|