发货金额校验

back_recharge
xuexinpeng 2021-06-10 14:48:53 +08:00
parent 17925142bc
commit 4d146a767b
1 changed files with 5 additions and 2 deletions

View File

@ -170,8 +170,11 @@ public class BuyGoodsNewLogic {
double priceTemp =config.getPrice();
int cfgType = SSpecialConfig.getIntegerValue(SSpecialConfig.EXCHANGE_FORCE_TYPE);
double price = priceTemp==0?0: SExchangeRate.doubleIntegerHashMap.get(cfgType).get((int)priceTemp);
if(amount!=-999&&MathUtils.doubleEquals(amount,price*10000)){
LOGGER.error("金额不对the uid={},the goodId={}, amount={},real={}", uid, goodsId, amount,price);
if(!MathUtils.doubleEquals(amount,price * 100)){
resultRes.setResultCode(0);
resultRes.setResultMsg("charge count error");
LOGGER.error("charge count error, uid={},the goodId={}, currentPrice={},realPrice={}",uid,goodsId, amount,price);
return resultRes;
}
User user = UserManager.getUser(uid);