|
@@ -267,7 +267,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
lqw.eq(ClassGradeUser::getStatus,1);
|
|
|
int studentNum = iClassGradeUserService.count(lqw);
|
|
|
//预留2空位避免超人数
|
|
|
- if(classGradeVo.getStudentUpper()-studentNum>3){
|
|
|
+ if(classGradeVo.getStudentUpper()-studentNum>0){
|
|
|
//班级还有剩位,直接加入班级
|
|
|
return joinGrade(orderGoodsId,gradeId,userId);
|
|
|
}
|
|
@@ -279,7 +279,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
for(int i = 0; i < classGradeVoList.size(); i++){
|
|
|
ClassGradeVo classGradeVo = classGradeVoList.get(i);
|
|
|
//预留2空位避免超人数
|
|
|
- if(classGradeVo.getStudentUpper()-classGradeVo.getStudentNum()>3){
|
|
|
+ if(classGradeVo.getStudentUpper()-classGradeVo.getStudentNum()>0){
|
|
|
//有空位则进入班级
|
|
|
gradeId = classGradeVo.getGradeId();
|
|
|
//班级还有剩位,直接加入班级
|