小程序支付bug
This commit is contained in:
parent
15f571f44f
commit
a89a6c5c27
@ -170,11 +170,17 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
cardValueOrders.setRechargeType("1");
|
||||
cardValueOrders.setBidBalance(cardValue.getBidBalance());
|
||||
cardValueOrders.setRechargeBalance(cardValue.getRechargeBalance());
|
||||
if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){
|
||||
if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance()) && cardValueRecordDTO.getBalance() >= cardValue.getRechargeBalance()){
|
||||
cardValueOrders.setGiftBalance(cardValue.getGiftBalance());
|
||||
}
|
||||
cardValueOrders.setPoints(cardValue.getPoints());
|
||||
cardValueOrders.setGrowthValue(cardValue.getGrowthValue());
|
||||
}else {
|
||||
cardValueOrders.setGiftBalance(0.0);
|
||||
cardValueOrders.setPoints(0);
|
||||
cardValueOrders.setGrowthValue(0);
|
||||
}
|
||||
cardValueOrders.setAmount(cardValueRecordDTO.getBalance() + cardValueOrders.getGiftBalance());
|
||||
cardValueOrders.setPayAmount(cardValueRecordDTO.getBalance());
|
||||
if (ObjectUtils.isNotEmpty(cardValue.getFringeBenefit())){
|
||||
cardValueOrders.setFringeBenefit(cardValue.getFringeBenefit());
|
||||
}
|
||||
@ -201,20 +207,6 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
cardValueOrders.setFringeBenefit(cardValue.getFringeBenefit());
|
||||
}
|
||||
}
|
||||
//查询储值卡信息
|
||||
/* CardValueVO cardValue = cardValueService.getOneById(cardValueRecordDTO.getId());
|
||||
cardValueOrders.setCardValueId(cardValue.getId());
|
||||
cardValueOrders.setRechargeType("0");
|
||||
cardValueOrders.setBidBalance(cardValue.getBidBalance());
|
||||
cardValueOrders.setRechargeBalance(cardValue.getRechargeBalance());
|
||||
if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){
|
||||
cardValueOrders.setGiftBalance(cardValue.getGiftBalance());
|
||||
}
|
||||
cardValueOrders.setPoints(cardValue.getPoints());
|
||||
cardValueOrders.setGrowthValue(cardValue.getGrowthValue());
|
||||
if (ObjectUtils.isNotEmpty(cardValue.getFringeBenefit())){
|
||||
cardValueOrders.setFringeBenefit(cardValue.getFringeBenefit());
|
||||
}*/
|
||||
//优惠券优惠金额
|
||||
if (ObjectUtils.isNotEmpty(cardValueRecordDTO.getCardFavorableId())){
|
||||
CardFavorable cardFavorable = cardFavorableService.getById(cardValueRecordDTO.getCardFavorableId());
|
||||
@ -258,14 +250,16 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
cardValueOrders.setAmountCommission(cardValue.getAmountCommission());
|
||||
}
|
||||
//订单金额
|
||||
if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){
|
||||
if (!cardValueRecordDTO.getTypes().equals("1")
|
||||
&& ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){
|
||||
//订单金额
|
||||
BigDecimal add = BigDecimal.valueOf(cardValue.getRechargeBalance()).add(BigDecimal.valueOf(cardValue.getGiftBalance()));
|
||||
cardValueOrders.setAmount(add.doubleValue());
|
||||
//支付金额
|
||||
cardValueOrders.setPayAmount(cardValue.getRechargeBalance());
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance()) && ObjectUtils.isNotEmpty(cardValueRecordDTO.getBalance())){
|
||||
if (!cardValueRecordDTO.getTypes().equals("1")
|
||||
&& ObjectUtils.isNotEmpty(cardValue.getGiftBalance()) && ObjectUtils.isNotEmpty(cardValueRecordDTO.getBalance())){
|
||||
//订单金额
|
||||
BigDecimal add = BigDecimal.valueOf(cardValue.getGiftBalance());
|
||||
cardValueOrders.setAmount(add.doubleValue() + cardValueRecordDTO.getBalance());
|
||||
@ -282,7 +276,8 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
cardValueOrders.setCardRecordId(cardValueRecordDTO.getCardRecordId());
|
||||
}
|
||||
//优惠金额
|
||||
if (ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){
|
||||
if (!cardValueRecordDTO.getTypes().equals("1")
|
||||
&& ObjectUtils.isNotEmpty(cardValue.getGiftBalance())){
|
||||
BigDecimal add = BigDecimal.valueOf(cardValue.getGiftBalance()).add(BigDecimal.valueOf(cardFavorableValue));
|
||||
cardValueOrders.setDiscount(add.doubleValue());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user