| | |
| | | .map(SysOrderFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | BigDecimal cardPayAmount = flows.stream() |
| | | .filter(item -> item.getPayMethod().equals("储值卡") && item.getIsGift().equals("N")) |
| | | .filter(item -> item.getPayMethod().equals("储值卡")) |
| | | .map(SysOrderFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | pageOrder.setCardPay(cardPayAmount.doubleValue()); |
| | | pageOrder.setCashPay(cashPayAmount.doubleValue()); |
| | | //欠款金额在流水处理中处理了 |
| | | |
| | | double sum = flows.stream().mapToDouble(item -> item.getAmount().doubleValue()).sum(); |
| | | |
| | | if(sum>0 && cardPayAmount.doubleValue()==0 && cashPayAmount.doubleValue()==0 ){ |
| | | throw new GlobleException("订单更新失败,支付金额计算错误,请联系管理员"); |
| | | } |
| | | |
| | | |
| | | sysOrderDao.update(pageOrder); |
| | | } |
| | |
| | | }else{ |
| | | puse.setPrice(sysOrderItem.getShoppingGoods().getSealPice()); |
| | | } |
| | | |
| | | } else { |
| | | puse.setPrice(0D); |
| | | } |
| | |
| | | moneyCardUseFlow.setCreateTime(new Date()); |
| | | moneyCardUseFlow.setOperationId(user.getSuId()); |
| | | moneyCardUseFlow.setBalance(cardUser.getGiftMoney() + cardUser.getRealMoney()); |
| | | moneyCardUseFlow.setCarUseId(cardUser.getId()); |
| | | moneyCardUseFlowDao.insert(moneyCardUseFlow); |
| | | |
| | | order.setFlows(czVo.getFlows()); |
| | |
| | | |
| | | sysInstoreInfoService.check(instoreInfo); |
| | | } |
| | | |
| | | @Override |
| | | public BigDecimal findVipArrearsByVipId(Long vipId) { |
| | | return sysOrderDao.selectArrearsByVipId(vipId); |
| | | } |
| | | } |