Procházet zdrojové kódy

优化:积分不足直接返回,不抛异常

lhm před 3 roky
rodič
revize
3eb7897178

+ 2 - 1
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -4780,7 +4780,8 @@ public class OrderServiceImpl implements OrderService {
             if (score < scoreLimit) {
                 LOGGER.error("会员码【{}】用户【{}】的积分数量为:{},最低需要{}积分才能抵扣!", memberCode, openId, score, scoreLimit);
                 calculateOrderDiscountPriceResponseVO.setAfterScore(score);
-                throw new ServiceException(String.format("用户【%s】的积分数量为:%s,最低需要%s积分才能抵扣!", openId, score, scoreLimit));
+                return orderTotalPrice;
+//                throw new ServiceException(String.format("用户【%s】的积分数量为:%s,最低需要%s积分才能抵扣!", openId, score, scoreLimit));
             } else {
                 // 积分取整
                 int scoreInteger = score % scoreLimit == 0 ? score : score - (score % scoreLimit);