刷新商品

back_recharge
wangyuan 2020-01-13 10:45:48 +08:00
parent 1ab634aeb6
commit 22262c4bb7
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){
cacheSendedIds.remove(-id);
return cacheSendedIds.add(id);
}

View File

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