Commit 142ee58c by huluobin

update

parent 1626207e
......@@ -413,7 +413,8 @@ public class MallOrderServiceImpl extends ServiceImpl<MallOrderMapper, MallOrder
Customer customer = customerService.getById(mallOrder.getCustomerId());
AgentUser agentUser = agentUserService.selectByPhone(customer.getPhone());
if (agentUser.getDiscount().compareTo(BigDecimal.ONE) < 0) {
if (agentUser != null && agentUser.getDiscount().compareTo(BigDecimal.ONE) < 0) {
mallOrder.setTotalDiscountAmount(mallOrder.getTotalAmount().multiply(BigDecimal.ONE.subtract(agentUser.getDiscount())));
mallOrder.setTotalPayAmount(mallOrder.getTotalAmount().multiply(agentUser.getDiscount()));
} else {
......
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 to comment