Commit 145f3422 by unknown

optimize the refund amount

parent 622133ca
......@@ -445,7 +445,11 @@ public class OpEventActivityOrderController extends AbstractOpOrderController<Ev
processBean.setPlayerNum(playerNum.trim());
}
BigDecimal refundTotalAmount = orderBean.getPrePayCardRefundAmount().add(orderBean.getRefundAmount());
BigDecimal requestTotalAmount = BigDecimal.valueOf(Double.parseDouble(refundAmount)).add(BigDecimal.valueOf(Double.parseDouble(prePayCardRefundAmount)));
BigDecimal requestTotalAmount = new BigDecimal(0);
if(StringUtils.isEmpty(refundAmount) && StringUtils.isEmpty(prePayCardRefundAmount)){
requestTotalAmount = BigDecimal.valueOf(Double.parseDouble(refundAmount)).add(BigDecimal.valueOf(Double.parseDouble(prePayCardRefundAmount)));
}
BigDecimal enableRefundAmount = orderBean.getPrePayAmount().subtract(orderBean.getVoucherAmount());
if(requestTotalAmount.add(refundTotalAmount).compareTo(enableRefundAmount)==1){
map.addAttribute("message", "退款金额超出限制!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment