|
@@ -9,7 +9,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
@Service
|
|
|
public class TeacherDefaultVipGroupSalaryServiceImpl extends BaseServiceImpl<Long, TeacherDefaultVipGroupSalary> implements TeacherDefaultVipGroupSalaryService {
|
|
@@ -24,7 +26,12 @@ public class TeacherDefaultVipGroupSalaryServiceImpl extends BaseServiceImpl<Lon
|
|
|
|
|
|
@Override
|
|
|
public TeacherDefaultVipGroupSalary findByTeacherAndCategory(Integer userId, Long categoryId) {
|
|
|
- return teacherDefaultVipGroupSalaryDao.findByTeacherAndCategory(userId,categoryId);
|
|
|
+ TeacherDefaultVipGroupSalary byTeacherAndCategory = teacherDefaultVipGroupSalaryDao.findByTeacherAndCategory(userId, categoryId);
|
|
|
+ if(Objects.isNull(byTeacherAndCategory)){
|
|
|
+ byTeacherAndCategory.setOfflineClassesSalary(new BigDecimal(0));
|
|
|
+ byTeacherAndCategory.setOnlineClassesSalary(new BigDecimal(0));
|
|
|
+ }
|
|
|
+ return byTeacherAndCategory;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -38,4 +45,4 @@ public class TeacherDefaultVipGroupSalaryServiceImpl extends BaseServiceImpl<Lon
|
|
|
teacherDefaultVipGroupSalaryDao.batchAdd(teacherDefaultVipGroupSalaries);
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+}
|