|
|
@ -178,7 +178,7 @@ public class UserBadgeRedis { |
|
|
|
* @date 2020.11.05 13:37 |
|
|
|
*/ |
|
|
|
public long pushOrRemoveUserBadge4List(String userId, String badgeId, String customerId) { |
|
|
|
List<UserBadgeUnitFormDTO> orient = obtainUserBadge2List(userId,customerId); |
|
|
|
List<UserBadgeUnitFormDTO> orient = redisUtils.lrange(UserRedisKeys.getResiUserBadgeKey(customerId,userId), NumConstant.ZERO, NumConstant.ONE_NEG, UserBadgeUnitFormDTO.class); |
|
|
|
UserBadgeUnitFormDTO unit = null; |
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(orient)) { |
|
|
@ -206,7 +206,7 @@ public class UserBadgeRedis { |
|
|
|
if (poolOpt.isPresent()) unit = ConvertUtils.sourceToTarget(poolOpt.get(), UserBadgeUnitFormDTO.class); |
|
|
|
else return NumConstant.ZERO; |
|
|
|
} |
|
|
|
redisUtils.leftPush(UserRedisKeys.getResiUserBadgeKey(customerId, userId), unit); |
|
|
|
redisUtils.leftPush(UserRedisKeys.getResiUserBadgeKey(customerId, userId), unit,-1); |
|
|
|
return NumConstant.ONE; |
|
|
|
} |
|
|
|
|
|
|
|