|  | @@ -294,9 +294,15 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
 | 
	
		
			
				|  |  |          for (int i = 0; i < goodsOrderDetails.size(); i++) {
 | 
	
		
			
				|  |  |              StudentPaymentOrderDetail orderDetail = orderDetails.get(i);
 | 
	
		
			
				|  |  |              //获取支付金额比例
 | 
	
		
			
				|  |  | -            BigDecimal ratioAmount = orderDetail.getPrice().divide(detailTotalPrice, 6, BigDecimal.ROUND_HALF_UP);
 | 
	
		
			
				|  |  | -            //获取优惠券金额比例
 | 
	
		
			
				|  |  | -            BigDecimal ratioCouponAmount = orderDetail.getRemitFee().divide(detailTotalRemitPrice, 6, BigDecimal.ROUND_HALF_UP);
 | 
	
		
			
				|  |  | +            BigDecimal ratioAmount = BigDecimal.ZERO;
 | 
	
		
			
				|  |  | +            if(detailTotalPrice.compareTo(BigDecimal.ZERO) > 0){
 | 
	
		
			
				|  |  | +                ratioAmount = orderDetail.getPrice().divide(detailTotalPrice, 6, BigDecimal.ROUND_HALF_UP);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            BigDecimal ratioCouponAmount = BigDecimal.ZERO;
 | 
	
		
			
				|  |  | +            if (detailTotalRemitPrice.compareTo(BigDecimal.ZERO) > 0) {
 | 
	
		
			
				|  |  | +                //获取优惠券金额比例
 | 
	
		
			
				|  |  | +                ratioCouponAmount = orderDetail.getRemitFee().divide(detailTotalRemitPrice, 6, BigDecimal.ROUND_HALF_UP);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              //获取分配的余额
 | 
	
		
			
				|  |  |              BigDecimal detailBalance;
 | 
	
		
			
				|  |  |              //获取分配的优惠券金额
 |