back_recharge
wangyuan 2020-01-13 17:43:42 +08:00
parent 9b45351ae2
commit 9dd949808d
2 changed files with 4 additions and 3 deletions

View File

@ -354,7 +354,7 @@ public class GlobalDataManaager implements IManager {
public static void flushGoodsTimes(User user){ public static void flushGoodsTimes(User user){
Map<Integer, Integer> buyGoodsTimes = user.getPlayerInfoManager().getRechargeInfo().getBuyGoodsTimes(); Map<Integer, Integer> buyGoodsTimes = user.getPlayerInfoManager().getRechargeInfo().getBuyGoodsTimes();
if(buyGoodsTimes!=null && buyGoodsTimes.isEmpty()){ if(buyGoodsTimes!=null && !buyGoodsTimes.isEmpty()){
Iterator<Integer> iterator = buyGoodsTimes.keySet().iterator(); Iterator<Integer> iterator = buyGoodsTimes.keySet().iterator();
boolean update = false; boolean update = false;
while (iterator.hasNext()){ while (iterator.hasNext()){

View File

@ -297,7 +297,7 @@ public class ActivityLogic implements IEventHandler{
checkNeedOpenStore(user,sGlobalActivity.getShopId(),startTime,endTime); checkNeedOpenStore(user,sGlobalActivity.getShopId(),startTime,endTime);
} else { } else {
long endTime = sGlobalActivity.getEndTimeLong(); long endTime = sGlobalActivity.getEndTimeLong();
goRewardActivity(user,activityId,builder,now>endTime + sGlobalActivity.getGapTime()); goRewardActivity(user,activityId,builder,now>endTime + sGlobalActivity.getGapTime()*TimeUtils.ONE_DAY);
} }
} }
return openNewActivityIds; return openNewActivityIds;
@ -355,7 +355,7 @@ public class ActivityLogic implements IEventHandler{
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.LUCKWHEEL_POOL_INDICATION_VALUE, builder.build(), true); MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.LUCKWHEEL_POOL_INDICATION_VALUE, builder.build(), true);
} }
private List<CommonProto.ActivityInfo> getActivityInfos(Map<Integer, ActivityMission> activityMissionMap, long createTime) { private List<CommonProto.ActivityInfo> getActivityInfos(Map<Integer, ActivityMission> activityMissionMap, long createTime) {
Map<Integer, SGlobalActivity> sGlobalActivityMap = SGlobalActivity.getsGlobalActivityMap(); Map<Integer, SGlobalActivity> sGlobalActivityMap = SGlobalActivity.getsGlobalActivityMap();
List<CommonProto.ActivityInfo> activityInfoList = new ArrayList<>(activityMissionMap.size()); List<CommonProto.ActivityInfo> activityInfoList = new ArrayList<>(activityMissionMap.size());
for (Map.Entry<Integer, ActivityMission> activityState : activityMissionMap.entrySet()) { for (Map.Entry<Integer, ActivityMission> activityState : activityMissionMap.entrySet()) {
@ -374,6 +374,7 @@ public class ActivityLogic implements IEventHandler{
if(activityStatus == ActivityType.CLOSE_STATE){ if(activityStatus == ActivityType.CLOSE_STATE){
long prepareTime = ToolsUtil.getEndTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),0, sGlobalActivity.getGapTime()); long prepareTime = ToolsUtil.getEndTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),0, sGlobalActivity.getGapTime());
activityInfoList.add(CommonProto.ActivityInfo.newBuilder().setActivityId(activityId).setEndTime((int)(prepareTime/1000)).build()); activityInfoList.add(CommonProto.ActivityInfo.newBuilder().setActivityId(activityId).setEndTime((int)(prepareTime/1000)).build());
continue;
} }
if (sGlobalActivity.getIsSaving()==0 && activityStatus != ActivityType.OPEN_STATE) { if (sGlobalActivity.getIsSaving()==0 && activityStatus != ActivityType.OPEN_STATE) {