back_recharge
lvxinran 2020-01-13 11:03:27 +08:00
commit 69610995d1
2 changed files with 8 additions and 5 deletions

View File

@ -40,6 +40,7 @@ public class RechargeInfo extends MongoBase{
} }
public boolean addNewSendId(int id){ public boolean addNewSendId(int id){
cacheSendedIds.remove(-id);
return cacheSendedIds.add(id); return cacheSendedIds.add(id);
} }

View File

@ -436,7 +436,7 @@ public class BuyGoodsLogic {
continue; continue;
} }
if(endTime!=0 && now > endTime){ if(endTime!=0 && now > endTime){
boolean isNew = rechargeInfo.addNewSendId(goodsId); boolean isNew = rechargeInfo.addNewSendId(-goodsId);
if(isNew){ if(isNew){
needChange = true; needChange = true;
} }
@ -484,14 +484,16 @@ public class BuyGoodsLogic {
} }
public static void minuteCheckReharge() throws Exception { public static void minuteCheckReharge() throws Exception {
for (Map.Entry<Integer, ISession> entry : OnlineUserManager.sessionMap.entrySet()) { Map<Integer, ISession> sessionMap = OnlineUserManager.sessionMap;
ISession value = entry.getValue(); Iterator<ISession> iterator = sessionMap.values().iterator();
while (iterator.hasNext()){
ISession value = iterator.next();
if(value.getFiveReady() == 1){ if(value.getFiveReady() == 1){
sendGiftGooodsIndication(entry.getKey()); sendGiftGooodsIndication(value.getUid());
}
} }
} }
}