he2802 1 år sedan
förälder
incheckning
babdd35774

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

@@ -340,6 +340,10 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Integer insertByAddBo(UserStudyRecordAddBo bo) {
+        if(Validator.isEmpty(bo.getCourseId())){
+            log.info("课程ID缺失"+JSON.toJSONString(bo));
+            throw new CustomException("课程ID缺失");
+        }
         //temp start
         GoodsVo goodsVo = iGoodsService.queryById(bo.getGoodsId());
         CourseBusinessQueryBo businessQueryBo = new CourseBusinessQueryBo();