he2802 2 년 전
부모
커밋
98897d9c7a
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseBusinessServiceImpl.java

+ 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("无法修改学习顺序");
             }