Browse Source

修改退款时积分精度丢失问题

zhangxin 14 giờ trước cách đây
mục cha
commit
fa6a4167b8

+ 1 - 1
yami-shop-service/src/main/java/com/yami/shop/service/impl/OrderServiceImpl.java

@@ -1657,7 +1657,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 
                             if (useScore > 0) {
                                 //退的积分不一定等于下单的数量
-                                totalRefundScore = (int) (totalRefundScore + Arith.mul(productCount * orderItem.getPrice(), 100));
+                                totalRefundScore = (totalRefundScore + productCount * ((int) Arith.mul(orderItem.getPrice(), 100)));
                             }
                             if (actualTotal > 0) {
                                 totalRefundActual = Arith.add(totalRefundActual, productCount * orderItem.getPrice());