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