he2802 2 years ago
parent
commit
fe1558e28a

+ 2 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseBusinessServiceImpl.java

@@ -187,7 +187,8 @@ public class CourseBusinessServiceImpl extends ServiceImpl<CourseBusinessMapper,
     @Override
     public boolean editLearningOrder(CourseBusinessEditBo bo) {
         for (Long businessId : bo.getBusinessIds()) {
-            CourseBusinessVo oldBusiness = this.queryById(businessId);
+            CourseBusiness oldBusiness = getOne(new LambdaQueryWrapper<CourseBusiness>()
+                    .eq(CourseBusiness::getId, businessId));
             if(oldBusiness.getGoodsLearningOrder()!=0){
                 throw new CustomException("无法修改学习顺序");
             }