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

feat:教师端课酬

Joburgess 4 éve
szülő
commit
6d02380656

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java

@@ -2345,6 +2345,12 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
             }
         }
 
+        for (LocalDateBigDecimalMapDto localDateBigDecimalMapDto : monthIncomeMapList) {
+            if(BigDecimal.ZERO.compareTo(localDateBigDecimalMapDto.getAmount())>0){
+                localDateBigDecimalMapDto.setAmount(BigDecimal.ZERO);
+            }
+        }
+
         monthIncomeMapList.sort(Comparator.comparing(LocalDateBigDecimalMapDto::getDate));
 
         BigDecimal reduce = monthIncomeMapList.stream().map(LocalDateBigDecimalMapDto::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);