From a1e4cfc3de4f3f3f3956b769bc7af40d097c8a4c Mon Sep 17 00:00:00 2001 From: liujie <liujie> Date: 星期二, 17 十月 2023 15:12:57 +0800 Subject: [PATCH] 修改bug --- cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java b/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java index 6590670..27297b4 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java +++ b/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java @@ -242,7 +242,11 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); Double payMoney = 0D; if(reservationSite.getPayType() == 3){ - payMoney = new BigDecimal(site.getCashPrice()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); + if(reservationSite.getIsHalf()==2){ + payMoney = new BigDecimal(site.getPlayPaiCoin()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); + }else { + payMoney = new BigDecimal(site.getPlayPaiCoinOne()).multiply(new BigDecimal(split.length)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); + } if(appUser.getPlayPaiCoins().compareTo(payMoney.intValue()) < 0){ return ResultUtil.error("玩湃币不足"); } @@ -325,7 +329,11 @@ return aliPaymentSite(payMoney, siteBooking); } if(reservationSite.getPayType() == 3){//玩湃币支付 - return playPaiCoinPaymentSite(appUser, payMoney, siteBooking); + if(reservationSite.getIsHalf()==2){ + return playPaiCoinPaymentSite(appUser, Double.valueOf(site.getPlayPaiCoin()), siteBooking); + }else { + return playPaiCoinPaymentSite(appUser, site.getPlayPaiCoinOne(), siteBooking); + } } return ResultUtil.success(); } -- Gitblit v1.7.1