back_recharge
lvxinran 2019-12-31 17:48:19 +08:00
commit b7a8b65530
3 changed files with 7 additions and 9 deletions

View File

@ -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());
}

View File

@ -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<CommonProto.GiftGoodsInfo> 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()){

View File

@ -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;
}