人民币支付做金额校验

grimm 2025-06-23 15:21:26 +08:00
parent 66b2b286af
commit 08510ab035
1 changed files with 9 additions and 8 deletions

View File

@ -1080,15 +1080,16 @@ public class BuyGoodsLogic {
}
int cfgType = SSpecialConfig.getIntegerValue(SSpecialConfig.EXCHANGE_FORCE_TYPE);
double price = SExchangeRate.doubleIntegerHashMap.get(cfgType).get((int) priceTemp);
//人民币要做金额校验
//判断支付金额与商品金额是否一致 如果使用了贬值器 priceTemp = 贬值后的价格
// if(amount!=-999 && price * 100 != amount) {
// LOGGER.error("支付金额与商品金额不一致 the uid={},goodId={},priceTemp={},amount={}", uid, goodsId,price,amount);
// resultRes.setResultCode(0);
// resultRes.setResultMsg(" 支付金额与商品金额不一致 price != amount ");
// return resultRes;
// }
if(cfgType == 1){
if(amount!=-999 && price * 100 != amount) {
LOGGER.error("支付金额与商品金额不一致 the uid={},goodId={},priceTemp={},amount={}", uid, goodsId,price,amount);
resultRes.setResultCode(0);
resultRes.setResultMsg(" 支付金额与商品金额不一致 price != amount ");
return resultRes;
}
}
int type = sRechargeCommodityConfig.getType();
RechargeHandler rechargeHandler = getRechargeHandler(sRechargeCommodityConfig.getOtype());
AbstractWelfareBag bag = rechargeHandler.getRechargeMap(user).get(goodsId);