58 lines
2.4 KiB
Java
58 lines
2.4 KiB
Java
package com.ruoyi.cai.manager;
|
|
|
|
import com.ruoyi.cai.constant.RedisHttpConstant;
|
|
|
|
public class LockManager {
|
|
|
|
public static final String LOCK_REGISTER_REDIS = RedisHttpConstant.REDIS_P + "lock:register:%s";
|
|
public static final String LOCK_DEAL_INVITE_REDIS = RedisHttpConstant.REDIS_P + "lock:dealInvite:%s";
|
|
public static final String LOCK_ADD_USER_GREET_REDIS = RedisHttpConstant.REDIS_P + "lock:addUserGreet:%s";
|
|
public static final String LOCK_SEND_GREET_REDIS = RedisHttpConstant.REDIS_P + "lock:sendGreet:%s";
|
|
public static final String LOCK_SEND_GUARD_REDIS = RedisHttpConstant.REDIS_P + "lock:sendGuard:%s";
|
|
public static final String LOCK_JOIN_ANCHOR_REDIS = RedisHttpConstant.REDIS_P + "lock:joinAnchor:%s";
|
|
public static final String LOCK_SEND_GIFT_REDIS = RedisHttpConstant.REDIS_P + "lock:sendGift:%s";
|
|
public static final String LOCK_VIDEO_SETTLE_REDIS = RedisHttpConstant.REDIS_P + "lock:videoSettle:%s";
|
|
public static final String LOCK_ONLINE_LOGIN_NOTICE_REDIS = RedisHttpConstant.REDIS_P + "lockHand:loginFansNotice:%s";
|
|
public static final String LOCK_USER_STAR_REDIS = RedisHttpConstant.REDIS_P + "userStar:%s-%s";
|
|
|
|
public static String getUserStarRedis(Long userId,Long starUserId){
|
|
return String.format(LOCK_USER_STAR_REDIS,userId,starUserId);
|
|
}
|
|
|
|
public static String getRegisterLockKey(String mobile){
|
|
return String.format(LOCK_REGISTER_REDIS,mobile);
|
|
}
|
|
|
|
public static String getDealInviteLockKey(Long userId){
|
|
return String.format(LOCK_DEAL_INVITE_REDIS,userId);
|
|
}
|
|
|
|
public static String getAddUserGreetLock(Long userId){
|
|
return String.format(LOCK_ADD_USER_GREET_REDIS,userId);
|
|
}
|
|
|
|
public static String getSendGreetLock(Long userId){
|
|
return String.format(LOCK_SEND_GREET_REDIS,userId);
|
|
}
|
|
|
|
public static String getSendGuardLock(Long userId){
|
|
return String.format(LOCK_SEND_GUARD_REDIS,userId);
|
|
}
|
|
|
|
public static String getVideoSettleLock(Long roomId){
|
|
return String.format(LOCK_VIDEO_SETTLE_REDIS,roomId);
|
|
}
|
|
|
|
public static String getSendGiftLock(Long userId){
|
|
return String.format(LOCK_SEND_GIFT_REDIS,userId);
|
|
}
|
|
|
|
public static String getLoginNoticeFansLock(Long userId){
|
|
return String.format(LOCK_ONLINE_LOGIN_NOTICE_REDIS,userId);
|
|
}
|
|
|
|
public static String getJoinAnchor(Long userId){
|
|
return String.format(LOCK_JOIN_ANCHOR_REDIS,userId);
|
|
}
|
|
}
|