he2802 2 lat temu
rodzic
commit
bd292b6f7b

+ 8 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -558,13 +558,16 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
             return "班级商品不存在";
         }
         Long bmrq = 0L;
+        if (Validator.isEmpty(userVo.getClassStartTime())) {
+            return "班级开始时间缺失";
+        }
         if(userVo.getClassStartTime().longValue()<orderGoods.getCreateTime().longValue()){
             bmrq = orderGoods.getCreateTime();
         }else{
             bmrq = userVo.getClassStartTime();
         }
         if(Validator.isEmpty(userVo.getRealName())||Validator.isEmpty(userVo.getIdCard())||Validator.isEmpty(userVo.getTelPhone())){
-            throw new CustomException("用户信息缺失");
+            return "用户信息缺失";
         }
         Map<String, String> params = new HashMap<>();
         params.put("zh", OFFICIALPUSH_INFOACCOUNT);
@@ -1680,7 +1683,10 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                                     classPeriodSectionVo.setStatus(userPeriodStatusVo.getStatus());
                                     classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
                                     classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
-                                    classPeriodSectionVo.setStudyStartTime(photoList.get(0).getCreateTime());
+                                    classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
+                                    if(Validator.isNotEmpty(photoList)){
+                                        classPeriodSectionVo.setStudyStartTime(photoList.get(0).getCreateTime());
+                                    }
                                     if(startTotalTime==0L||startTotalTime.longValue()>classPeriodSectionVo.getStudyStartTime().longValue()){
                                         startTotalTime = classPeriodSectionVo.getStudyStartTime();
                                     }