diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/activity/LuckWheelExpectRankActivity.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/activity/LuckWheelExpectRankActivity.java index d92d4c450..4efaaf782 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/activity/LuckWheelExpectRankActivity.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/activity/LuckWheelExpectRankActivity.java @@ -14,7 +14,6 @@ class LuckWheelExpectRankActivity extends ExpectRankActivity { public LuckWheelExpectRankActivity(int id) { super(id); - Poster.getPoster().listenEvent(this, LuckWheelAdvanceEvent.class); Poster.getPoster().listenEvent(this, LuckWheelEvent.class); } @@ -22,7 +21,7 @@ class LuckWheelExpectRankActivity extends ExpectRankActivity { public void onEvent(IEvent event) throws Exception { if (!(event instanceof LuckWheelEvent)) return; - update(UserManager.getUser(((LuckWheelEvent) event).getUid()), 1); + update(UserManager.getUser(((LuckWheelEvent) event).getUid()), ((LuckWheelEvent) event).getTime()); } diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/activity/eventhandler/HeroFiveStarGetEventHandler.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/activity/eventhandler/HeroFiveStarGetEventHandler.java index d21d70f53..41ba555a1 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/activity/eventhandler/HeroFiveStarGetEventHandler.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/activity/eventhandler/HeroFiveStarGetEventHandler.java @@ -46,8 +46,8 @@ public class HeroFiveStarGetEventHandler implements IEventHandler { if(typeBagMap.containsKey(((HeroFiveStarGetEvent) event).getStar())){ long lasttime = rechargeInfo.getTypeBagMap().get(((HeroFiveStarGetEvent) event).getStar()); - long diffHourTemp =(now - lasttime) / 60 ; - if (diffHourTemp < 1000) { + int diffHourTemp = (int) ((now - lasttime) / 3600 / 1000); + if (diffHourTemp < 2) { rechargeInfo.addDyGoodsCanBuyTimes(goodsId); }else { rechargeInfo.putDyGoodsCanBuyTimes(goodsId,1); @@ -63,7 +63,6 @@ public class HeroFiveStarGetEventHandler implements IEventHandler { List goodsBagInfo = new ArrayList<>(SRechargeCommodityConfig.rechargeCommodityConfigMap.size()); BuyGoodsLogic.getGoodsBagInfo(user.getId(), goodsBagInfo,false); - System.out.print(goodsBagInfo.toString()); ISession session = OnlineUserManager.getSessionByUid(user.getId()); if(session!=null){ if(null!= HandlerLogicThread.current()){ diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsLogic.java index 7a41574de..e6f92c64c 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsLogic.java @@ -398,20 +398,20 @@ public class BuyGoodsLogic { } startTime = typeBagMap.get(value); - int addtime = 1000; - int diffHour = (int) ((now - startTime) / 60 ); + int addtime = discountType[2]; + int diffHour = (int) ((now - startTime) / 3600 / 1000); if (diffHour >= addtime) { rechargeInfo.removeDyGoodsCanBuyTimes(goodsId); continue; } - endTime = startTime + addtime * 60; + endTime = startTime + addtime * 3600 * 1000; if (rechargeInfo.getCacheSendedTypes().containsKey(value)) { long lasttime = rechargeInfo.getCacheSendedTypes().get(value); if(lasttime != startTime){ needChange = true; rechargeInfo.getCacheSendedTypes().put(value, startTime); - int diffHourTemp = (int) ((now - lasttime) / 60 ); + int diffHourTemp = (int) ((now - lasttime) / 3600 / 1000); if (diffHourTemp < addtime) { startTime =0; }