From 98b068f243730dd98839580c99d98becd7798c30 Mon Sep 17 00:00:00 2001 From: mengchengzhen <13682025901@163.com> Date: Tue, 27 Apr 2021 21:18:46 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E7=A4=BC=E5=8C=85=E8=B1=AA?= =?UTF-8?q?=E5=8D=8E=E5=9F=BA=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java | 2 ++ .../logic/store/newRechargeInfo/bean/AbstractWelfareBag.java | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java index 38d408fd1..984d5e7e8 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java @@ -610,6 +610,8 @@ public class BuyGoodsNewLogic { builder.setStartTime((int)(bag.getStartTime()/1000)); if(bag.getType() == RechargeType.perpetual.getType() && bag.getRefreshTime() > 0){ builder.setEndTime((int)(bag.getRefreshTime()/1000)); + }else if(bag.getType() == RechargeType.receive.getType() && bag.getEndTime() == 0){ + builder.setEndTime((int)((bag.getStartTime() + bag.getContinueDays() * TimeUtils.DAY)/1000)); }else{ builder.setEndTime((int)(bag.getEndTime()/1000)); } diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/newRechargeInfo/bean/AbstractWelfareBag.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/newRechargeInfo/bean/AbstractWelfareBag.java index 6a16708cb..03704e26b 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/newRechargeInfo/bean/AbstractWelfareBag.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/newRechargeInfo/bean/AbstractWelfareBag.java @@ -185,9 +185,6 @@ public class AbstractWelfareBag extends MongoBase{ public long getEndTime() { return endTime; } public void setEndTime(long endTime) { - if(getModId() == 101){ - System.out.println(); - } this.endTime = endTime; updateString("endTime",endTime); } From 32900d9aa969b4b873b9cc22ab6328e4c12e5380 Mon Sep 17 00:00:00 2001 From: mengchengzhen <13682025901@163.com> Date: Tue, 27 Apr 2021 21:37:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E7=A4=BC=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java index 7dea6780a..76fdc3a78 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java @@ -660,10 +660,10 @@ public class BuyGoodsNewLogic { List pushList = info.getPushList(); List goodsBagInfo = new ArrayList<>(SRechargeCommodityNewConfig.configMap.size()); getGoodsBagInfo(user.getId(), goodsBagInfo); - PlayerInfoProto.PushWelfareResponse pushWelfareResponse = PlayerInfoProto.PushWelfareResponse.newBuilder().addAllId(pushList).build(); - MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.PUSH_WELFARE_RESPONSE.getNumber(), pushWelfareResponse, true); PlayerInfoProto.AllGiftGoodsIndication goodsBuild = PlayerInfoProto.AllGiftGoodsIndication.newBuilder().addAllGiftGoodsInfo(goodsBagInfo).build(); MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.ALL_GIFTGOODS_INDICATION_VALUE, goodsBuild, true); + PlayerInfoProto.PushWelfareResponse pushWelfareResponse = PlayerInfoProto.PushWelfareResponse.newBuilder().addAllId(pushList).build(); + MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.PUSH_WELFARE_RESPONSE.getNumber(), pushWelfareResponse, true); } private static int judgePushCondition(User user,SPackPushConfig con){ From 2cfe67afe4742ad8636b5f7184d5dcefe3fb2317 Mon Sep 17 00:00:00 2001 From: mengchengzhen <13682025901@163.com> Date: Tue, 27 Apr 2021 22:28:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=96=B0=E7=A4=BC=E5=8C=85=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E5=BC=B9=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java index 76fdc3a78..271075721 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/store/BuyGoodsNewLogic.java @@ -649,21 +649,24 @@ public class BuyGoodsNewLogic { if(list == null){ return; } + int popup = 0; for(SPackPushConfig con : list){ int bagId = judgePushCondition(user,con); if(bagId > 0 && info.getNextPushTime() < System.currentTimeMillis()){ + popup = bagId; info.setNextPushTime(System.currentTimeMillis() + con.getcDTime() * TimeUtils.HOUR); SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.getConfigById(bagId); initUnitWF(user,config); } } - List pushList = info.getPushList(); List goodsBagInfo = new ArrayList<>(SRechargeCommodityNewConfig.configMap.size()); getGoodsBagInfo(user.getId(), goodsBagInfo); PlayerInfoProto.AllGiftGoodsIndication goodsBuild = PlayerInfoProto.AllGiftGoodsIndication.newBuilder().addAllGiftGoodsInfo(goodsBagInfo).build(); MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.ALL_GIFTGOODS_INDICATION_VALUE, goodsBuild, true); - PlayerInfoProto.PushWelfareResponse pushWelfareResponse = PlayerInfoProto.PushWelfareResponse.newBuilder().addAllId(pushList).build(); - MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.PUSH_WELFARE_RESPONSE.getNumber(), pushWelfareResponse, true); + if(popup != 0){ + PlayerInfoProto.PushWelfareResponse pushWelfareResponse = PlayerInfoProto.PushWelfareResponse.newBuilder().addId(popup).build(); + MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.PUSH_WELFARE_RESPONSE.getNumber(), pushWelfareResponse, true); + } } private static int judgePushCondition(User user,SPackPushConfig con){