修改礼包限购次数问题

master_ob2
PC-202302260912\Administrator 2023-08-07 21:34:36 +08:00
parent ee66a8d42c
commit 8195177d87
3 changed files with 11 additions and 7 deletions

View File

@ -16,21 +16,21 @@ public class MongoRechargeConverter implements Converter<BasicDBObject, Abstract
public AbstractWelfareBag convert(BasicDBObject source) {
Gson gson = new Gson();
SRechargeCommodityNewConfig config = STableManager.getConfig(SRechargeCommodityNewConfig.class).get(source.getInt("modId"));
Class<? extends AbstractWelfareBag> target = PerpetualWelfareBag.class;
Class<? extends AbstractWelfareBag> target = AbstractWelfareBag.class;
if (config != null){
if(config.getOtype() == RechargeType.timeLimit.getType()){
target = TimeLimitWelfareBag.class;
}
if(config.getOtype() ==RechargeType.perpetual.getType()){
if(config.getOtype() == RechargeType.perpetual.getType()){
target = PerpetualWelfareBag.class;
}
if(config.getOtype()==RechargeType.receive.getType()){
if(config.getOtype()== RechargeType.receive.getType()){
target = ReceiveWelfareBag.class;
}
if(config.getOtype()==RechargeType.push.getType()){
if(config.getOtype()== RechargeType.push.getType()){
target = PushWelfareBag.class;
}
if(config.getOtype()==RechargeType.gmSingle.getType()){
if(config.getOtype()== RechargeType.gmSingle.getType()){
target = GmSingleWelfareBag.class;
}
}

View File

@ -210,10 +210,10 @@ public class BuyGoodsNewLogic {
int goodsId = config.getId();
// 支付金额用分
double price = config.getPrice()*100;
double price = config.getPrice();
// int cfgType = SSpecialConfig.getIntegerValue(SSpecialConfig.EXCHANGE_FORCE_TYPE);
// double price = priceTemp==0?0: SExchangeRate.doubleIntegerHashMap.get(cfgType).get((int)priceTemp);
if(amount != price){
if(amount != price*100){
resultRes.setResultMsg("charge price error");
LOGGER.error("sendGoods 金额校验失败, uid={},the goodId={}, currentPrice={},realPrice={}",uid,goodsId, amount,price);
return resultRes;

View File

@ -190,6 +190,10 @@ public abstract class AbstractWelfareBag extends MongoBase{
return 0;
}
public void setBuyTimes(int buyTimes) {
this.buyTimes = buyTimes;
}
public int[] getPrivilege() {
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.configMap.get(modId);
if (config != null){