全民福利,单个服务器生效
parent
56e993f2a9
commit
d9c771e49b
|
@ -1485,12 +1485,7 @@ public class RedisUtil {
|
|||
return type + RedisKey.Delimiter_colon + key;
|
||||
}
|
||||
if (result == null) {
|
||||
// if (RedisKey.GUILD_RELEASE.equals(type)) {
|
||||
// RedisUtil.getInstence().get(RedisKey.GUILD_SERVERID + RedisKey.Delimiter_colon + )
|
||||
// result = + RedisKey.Delimiter_colon + type + RedisKey.Delimiter_colon + key;
|
||||
// }else {
|
||||
result = AreaManager.areaId + RedisKey.Delimiter_colon + type + RedisKey.Delimiter_colon + key;
|
||||
// }
|
||||
result = AreaManager.areaId + RedisKey.Delimiter_colon + type + RedisKey.Delimiter_colon + key;
|
||||
}
|
||||
// 保存需要清理的key
|
||||
saveRemoveKeyHandler(result);
|
||||
|
|
|
@ -59,13 +59,13 @@ public class AllPeopleWelfareActivity extends AbstractActivity {
|
|||
}
|
||||
|
||||
public static int getValue(int goodId){
|
||||
Integer value = RedisUtil.getInstence().getMapValue(RedisKey.ALL_PEOPLE_WELFARE_BUY_COUNT, String.valueOf(goodId), Integer.class);
|
||||
Integer value = RedisUtil.getInstence().getMapValue(RedisKey.ALL_PEOPLE_WELFARE_BUY_COUNT,"", String.valueOf(goodId), Integer.class);
|
||||
return Optional.ofNullable(value).orElse(0);
|
||||
}
|
||||
|
||||
public static void addValue(int goodId, int count){
|
||||
int value = getValue(goodId)+count;
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.ALL_PEOPLE_WELFARE_BUY_COUNT, String.valueOf(goodId), value);
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.ALL_PEOPLE_WELFARE_BUY_COUNT,"", String.valueOf(goodId), value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue