周卡优化
parent
3261813450
commit
58d7dc27c6
|
@ -68,6 +68,8 @@ import java.text.ParseException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.ljsd.jieling.logic.store.BuyGoodsNewLogic.refreshUnitWF;
|
||||||
|
|
||||||
public class PlayerLogic {
|
public class PlayerLogic {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(PlayerLogic.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(PlayerLogic.class);
|
||||||
private PlayerLogic(){
|
private PlayerLogic(){
|
||||||
|
@ -1696,7 +1698,7 @@ public class PlayerLogic {
|
||||||
return cardInfos;
|
return cardInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkOldMonthCard(User user) throws ParseException {
|
public void checkOldMonthCard(User user) throws Exception {
|
||||||
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||||
if (playerInfoManager.getOldMonthCardMark() == 1){
|
if (playerInfoManager.getOldMonthCardMark() == 1){
|
||||||
return;
|
return;
|
||||||
|
@ -1716,14 +1718,16 @@ public class PlayerLogic {
|
||||||
RechargeHandler rechargeHandler = BuyGoodsNewLogic.getRechargeHandler(newConfig.getOtype());
|
RechargeHandler rechargeHandler = BuyGoodsNewLogic.getRechargeHandler(newConfig.getOtype());
|
||||||
AbstractWelfareBag bag = rechargeHandler.getRechargeMap(user).get(goodId);
|
AbstractWelfareBag bag = rechargeHandler.getRechargeMap(user).get(goodId);
|
||||||
if (bag == null){
|
if (bag == null){
|
||||||
LOGGER.error("老玩家月卡兼容报错,礼包信息不存在,uid:{},goodid:{}",user.getId(),goodId);
|
bag = rechargeHandler.initUnitWF(user, newConfig);
|
||||||
continue;
|
refreshUnitWF(bag,user);
|
||||||
|
rechargeHandler.addNew(user,bag);
|
||||||
}
|
}
|
||||||
boolean bol = bag.buy();
|
boolean bol = bag.buy();
|
||||||
if (!bol){
|
if (!bol){
|
||||||
LOGGER.error("老玩家月卡兼容报错,礼包已购买,uid:{},goodid:{}",user.getId(),goodId);
|
LOGGER.error("老玩家月卡兼容报错,礼包已购买,uid:{},goodid:{}",user.getId(),goodId);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
BuyGoodsNewLogic.activePrivilege(user,newConfig);
|
||||||
BuyGoodsNewLogic.activeMonthCard(user,goodId);
|
BuyGoodsNewLogic.activeMonthCard(user,goodId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue