소스 검색

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

hurx 1 개월 전
부모
커밋
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());
         }