zouxuan hace 3 años
padre
commit
9a8082dce7

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java

@@ -4667,7 +4667,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         ClassGroup classGroup = new ClassGroup();
         classGroup.setSubjectIdList(applyBaseInfoDto.getSubjectId().toString());
         classGroup.setExpectStudentNum(1);
-        classGroup.setStudentNum(1);
+        classGroup.setStudentNum(0);
         classGroup.setName(applyBaseInfoDto.getName());
         classGroup.setTotalClassTimes(totalClassTimes);
         classGroup.setType(ClassGroupTypeEnum.PRACTICE);
@@ -5036,7 +5036,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         if(practiceGroup.getPaymentExpireDate().before(date)){
             throw new BizException("该课程已结束报名!");
         }
-        if(practiceGroup.getStudentId() != user.getId()){
+        if(practiceGroup.getStudentId().equals(user.getId())){
             throw new BizException("您无法购买此课程");
         }