Преглед на файлове

feat(order): 更新订单主服务中的剩余配额计算逻辑
- 修改了剩余配额的计算方式,将临时配额与信用额度相加作为新的剩余配额

hurx преди 3 седмици
родител
ревизия
4404b7f213
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/impl/OrderMainServiceImpl.java

+ 1 - 1
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/impl/OrderMainServiceImpl.java

@@ -141,7 +141,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
         RemoteCustomerSalesVo remoteCustomerSalesVo = remoteCustomerSalesService.selectCustomerSalesInfoByCustomerId(orderMainVo.getCustomerId());
         if (null != remoteCustomerSalesVo) {
             orderMainVo.setCreditLimit(remoteCustomerSalesVo.getCreditAmount());
-            orderMainVo.setRemainingQuota(remoteCustomerSalesVo.getRemainingQuota());
+            orderMainVo.setRemainingQuota(remoteCustomerSalesVo.getTemporaryQuota().add(remoteCustomerSalesVo.getCreditAmount()));
             orderMainVo.setTemporaryQuota(remoteCustomerSalesVo.getTemporaryQuota());
         }