Commit 42f4e036 authored by zhangqingle's avatar zhangqingle

修改接口

parent 89641d4f
...@@ -1037,7 +1037,7 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -1037,7 +1037,7 @@ public class BLessonServiceImpl implements BLessonService {
} }
//查询报名人数是否小于规定人数 //查询报名人数是否小于规定人数
int trainApplyCount = bLessonRepository.trainApplyCount(bLesson.getBusinessId()); int trainApplyCount = bLessonRepository.trainApplyCount(bLesson.getBusinessId());
if (StringUtils.isNotEmpty(bLesson.getMaxApplyPerson()) && trainApplyCount >= Integer.parseInt(bLesson.getMaxApplyPerson())){ if (StringUtils.isNotEmpty(bLesson.getMaxApplyPerson()) && !"0".equals(bLesson.getMaxApplyPerson()) && trainApplyCount >= Integer.parseInt(bLesson.getMaxApplyPerson()) ){
bLesson.setApplyIsFull("1"); bLesson.setApplyIsFull("1");
}else { }else {
bLesson.setApplyIsFull("0"); bLesson.setApplyIsFull("0");
...@@ -1062,7 +1062,7 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -1062,7 +1062,7 @@ public class BLessonServiceImpl implements BLessonService {
throw new ServiceException(ResultServiceEnums.LESSON_NOT_EXISTA); throw new ServiceException(ResultServiceEnums.LESSON_NOT_EXISTA);
} }
int trainApplyCount = bLessonRepository.trainApplyCount(bLesson.getBusinessId()); int trainApplyCount = bLessonRepository.trainApplyCount(bLesson.getBusinessId());
if (StringUtils.isNotEmpty(bLesson.getMaxApplyPerson()) &&trainApplyCount >= Integer.parseInt(bLesson.getMaxApplyPerson())){ if (StringUtils.isNotEmpty(bLesson.getMaxApplyPerson()) && !"0".equals(bLesson.getMaxApplyPerson()) && trainApplyCount >= Integer.parseInt(bLesson.getMaxApplyPerson()) ){
bLesson.setApplyIsFull("1"); bLesson.setApplyIsFull("1");
}else { }else {
bLesson.setApplyIsFull("0"); bLesson.setApplyIsFull("0");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment