You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
38 lines
1.0 KiB
package com.epmet.constant;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
/**
|
|
* @Description
|
|
* @ClassName UserRedisKeys
|
|
* @Auth wangc
|
|
* @Date 2020-07-22 17:16
|
|
*/
|
|
public class UserRedisKeys {
|
|
|
|
/**
|
|
* 党群e事通redis前缀
|
|
*/
|
|
private static String rootPrefix = "epmet:";
|
|
|
|
/**
|
|
* @Description 用户缓存Key
|
|
* @Param 用户Id
|
|
* @return epmet:resi:user:userId
|
|
* @Author wangc
|
|
* @Date 2020.04.13 11:27
|
|
**/
|
|
public static String getResiUserKey(String userId){
|
|
return rootPrefix.concat("resi:user:").concat(userId);
|
|
}
|
|
|
|
/**
|
|
* @Description 用户勋章缓存 epmet:badge:user:[customerId]:[userId]
|
|
* @param userId
|
|
* @return epmet:badge:user:[customerId]:[userId]
|
|
* @author wangc
|
|
* @date 2020.11.05 13:34
|
|
*/
|
|
public static String getResiUserBadgeKey(String customerId,String userId){
|
|
return rootPrefix.concat("badge:user:").concat(customerId).concat(":").concat( StringUtils.isBlank(userId) ? "*" : userId );}
|
|
}
|
|
|