he2802 2 years ago
parent
commit
acfc335484

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordServiceImpl.java

@@ -55,6 +55,7 @@ import com.zhongzheng.modules.order.service.IOrderGoodsService;
 import com.zhongzheng.modules.order.vo.OrderGoodsVo;
 import com.zhongzheng.modules.polyv.bo.PolyvLiveQueryBo;
 import com.zhongzheng.modules.polyv.service.IPolyvLiveService;
+import com.zhongzheng.modules.system.domain.SysOldOrg;
 import com.zhongzheng.modules.user.bo.*;
 import com.zhongzheng.modules.user.domain.*;
 import com.zhongzheng.modules.user.mapper.UserStudyRecordMapper;
@@ -881,6 +882,10 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
         if(Validator.isEmpty(bo.getGoodsId())||Validator.isEmpty(bo.getOrderGoodsId())){
             throw new CustomException("参数缺失");
         }
+        ClassGradeUser classGradeUser = iClassGradeUserService.getOne(new LambdaQueryWrapper< ClassGradeUser >().eq(ClassGradeUser::getUserId, bo.getUserId()).eq(ClassGradeUser::getOrderGoodsId, bo.getOrderGoodsId()).last("limit 1"));
+        if(Validator.isEmpty(classGradeUser)){
+            throw new CustomException("非法数据",601);
+        }
         //存储整个目录节列表
         List<ClassPeriodVo> sectionList = new ArrayList<>();
         GoodsCourseQueryBo queryBo = new GoodsCourseQueryBo();