战力冲刺
parent
1368922c6d
commit
900412365d
|
@ -223,6 +223,7 @@ public class ActivityLogic implements IEventHandler{
|
|||
}
|
||||
}
|
||||
abstractActivity.onActivityPreEnd();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (null == abstractActivity) {
|
||||
|
|
|
@ -42,9 +42,7 @@ public class PowerRiceActivity extends AbstractActivity{
|
|||
//取出实时排行榜数据 存到另一个redis字段中
|
||||
Set<ZSetOperations.TypedTuple<String>> rankInfos = rank.getRankByKey("", 0,-1);
|
||||
for(ZSetOperations.TypedTuple<String> rankInfo:rankInfos){
|
||||
if(powerRank.getScoreById(Integer.parseInt(rankInfo.getValue()),"") == 0){
|
||||
powerRank.addRank(Integer.parseInt(rankInfo.getValue()),"",rankInfo.getScore());
|
||||
}
|
||||
powerRank.addRank(Integer.parseInt(rankInfo.getValue()),"",rankInfo.getScore());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,7 +65,8 @@ public class PowerRiceActivity extends AbstractActivity{
|
|||
*/
|
||||
@Override
|
||||
public void onActivityEnd() throws Exception {
|
||||
|
||||
AbstractRank powerRank = RankContext.getRankEnum(RankEnum.POWER_RICE_RANK.getType());
|
||||
powerRank.removeRank("");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -92,8 +91,6 @@ public class PowerRiceActivity extends AbstractActivity{
|
|||
index++;
|
||||
}
|
||||
GlobalSystemControl globalSystemControl = GlobalSystemControl.getGlobalSystemControl();
|
||||
//HashMap<Integer, Integer> activityPreMap = globalSystemControl.getActivityPreEnd();
|
||||
//activityPreMap.put(id,TimeUtils.nowInt());
|
||||
globalSystemControl.addActivityPreEnd(id,TimeUtils.now());
|
||||
GlobalSystemControl.save(globalSystemControl);
|
||||
}
|
||||
|
|
|
@ -386,4 +386,9 @@ public abstract class AbstractRank implements IRank {
|
|||
}
|
||||
}
|
||||
|
||||
public void removeRank(String rkey){
|
||||
String key = RedisUtil.getInstence().getKey(redisKey, rkey);
|
||||
RedisUtil.getInstence().del(key);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue