xgb пре 3 дана
родитељ
комит
e3713b7bdf

+ 18 - 15
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -2926,28 +2926,31 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
             result=false;
         }
 
-        if(watchLog.getCompanyId()!=null){
-            Company company=companyMapper.selectCompanyById(watchLog.getCompanyId());
-            if(company!=null && company.getIsOpenRestReminder()!=null){
-                if(company.getIsOpenRestReminder()==0){
-                    result=false;
-                }else {
-                    result=true;
+        if(watchLog!=null){
+            if(watchLog.getCompanyId()!=null){
+                Company company=companyMapper.selectCompanyById(watchLog.getCompanyId());
+                if(company!=null && company.getIsOpenRestReminder()!=null){
+                    if(company.getIsOpenRestReminder()==0){
+                        result=false;
+                    }else {
+                        result=true;
+                    }
                 }
             }
-        }
 
-        if(watchLog.getPeriodId()!=null){
-            FsUserCoursePeriod period= fsUserCoursePeriodMapper.selectFsUserCoursePeriodById(watchLog.getPeriodId());
-            if(period!=null && period.getIsOpenRestReminder()!=null){
-                if(period.getIsOpenRestReminder()==0){
-                    result=false;
-                }else {
-                    result=true;
+            if(watchLog.getPeriodId()!=null){
+                FsUserCoursePeriod period= fsUserCoursePeriodMapper.selectFsUserCoursePeriodById(watchLog.getPeriodId());
+                if(period!=null && period.getIsOpenRestReminder()!=null){
+                    if(period.getIsOpenRestReminder()==0){
+                        result=false;
+                    }else {
+                        result=true;
+                    }
                 }
             }
         }
 
+
         return result;
     }