瀏覽代碼

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

hurx 3 周之前
父節點
當前提交
4404b7f213

+ 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());
         }