Commit 897f0284 by chongli

Merge branch 'f-6.6.7' of 192.168.10.6:caosy/fun-golf-service into f-6.6.7

parents 7771004d bbb647d2
......@@ -836,6 +836,14 @@ public class EventActivityOrderService extends
(BigDecimal.valueOf(resourcePrice.getCommuneGuestPrice())
.subtract(BigDecimal.valueOf(resourcePrice
.getCommuneGuestMinus()))))).doubleValue();
//boolean isCommuneQuantityCorrect = (communeNum == resourceInfo.getCommuneQuantity());
//boolean isCommuneGuestQuantityCorrect = (communeGuestNum == resourceInfo.getCommuneGuestQuantity());
//boolean isTotalQuantityCorrect = ((communeNum+communeGuestNum) == resourceInfo.getQuantity());
//校准quantity人数,有可能客户端传的人数有差,理论上应该直接抛异常,不过为了兼容线上老版本, 先放行,服务端先处理掉。
resourceInfo.setCommuneQuantity(communeNum);
resourceInfo.setCommuneGuestQuantity(communeGuestNum);
resourceInfo.setQuantity(communeNum+communeGuestNum);
if (resourceInfo.getAmount().compareTo(BigDecimal.valueOf(amount)) == -1) { //如果金额大于或者等于实际金额正常
throw new OrderException(-5, "订单金额计算有误");
} else if (!resourcePrice.getCommunePrice().equals(resourceInfo.getCommunePrice())
......
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