Forráskód Böngészése

fix(national-motion): 修复订单价格计算和门禁记录同步问题

- 在 AppSitePriceRules 实体中为 sellingPrice 字段添加默认值 BigDecimal.ZERO
- 在 OrderServiceImpl 中添加对 sellingPrice 为空的处理,避免计算错误
- 优化 OrTeachingJobService 中的门禁记录同步逻辑,移除不必要的数据提取步骤
SheepHy 3 hete
szülő
commit
7744628891

+ 3 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/OrderServiceImpl.java

@@ -316,6 +316,9 @@ public class OrderServiceImpl implements IOrderService {
         List<AppSitePriceRules> priceRules = new ArrayList<>();
         list.forEach(priceRule -> {
             AppSitePriceRules appSitePriceRule = appSitePriceRulesMapper.selectById(priceRule);
+            if(null == appSitePriceRule.getSellingPrice()){
+                appSitePriceRule.setSellingPrice(BigDecimal.ZERO);
+            }
             priceRules.add(appSitePriceRule);
         });
         BigDecimal totalPrice = BigDecimal.ZERO;

+ 1 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppSitePriceRules.java

@@ -83,7 +83,7 @@ public class AppSitePriceRules implements Serializable {
     /**售价*/
     @Excel(name = "售价", width = 15)
     @Schema(description = "售价")
-    private BigDecimal sellingPrice;
+    private BigDecimal sellingPrice = BigDecimal.ZERO;
     /**是否教学日0是1不是*/
     @Excel(name = "是否教学日0是1不是", width = 15)
     @Schema(description = "是否教学日0是1不是")