修改礼包限购次数问题
parent
ee66a8d42c
commit
8195177d87
|
@ -16,7 +16,7 @@ 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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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){
|
||||
|
|
Loading…
Reference in New Issue