|
|
@@ -638,7 +638,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
|
|
|
//选择新的班级
|
|
|
@Override
|
|
|
- public boolean changeGrade(String goodsName,Long goodsId,Long orderGoodsId,Long gradeId,Long userId){
|
|
|
+ public Long changeGrade(String goodsName,Long goodsId,Long orderGoodsId,Long gradeId,Long userId){
|
|
|
//查询该学员有没有有效期内同商品班级 有就不允许添加
|
|
|
/* Integer classNum = baseMapper.selectUserClass(goodsId,userId);
|
|
|
if (classNum > 0){
|
|
|
@@ -670,7 +670,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
//预留0空位避免超人数
|
|
|
if((classGradeVo.getStudentUpper()-studentNum-locakStudentNum)>0){
|
|
|
//班级还有剩位,直接加入班级
|
|
|
- return joinGrade(orderGoodsId,gradeId,userId);
|
|
|
+ joinGrade(orderGoodsId,gradeId,userId);
|
|
|
+ return gradeId;
|
|
|
}
|
|
|
}
|
|
|
//无指定班级或者指定班级已满
|
|
|
@@ -691,7 +692,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
//有空位则进入班级
|
|
|
gradeId = classGradeVo.getGradeId();
|
|
|
//班级还有剩位,直接加入班级
|
|
|
- return joinGrade(orderGoodsId,gradeId,userId);
|
|
|
+ joinGrade(orderGoodsId,gradeId,userId);
|
|
|
+ return gradeId;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -715,7 +717,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
iClassGradeGoodsService.save(classGradeGoods);
|
|
|
//加入班级
|
|
|
joinGrade(orderGoodsId,classGrade.getGradeId(),userId);
|
|
|
- return true;
|
|
|
+ return classGrade.getGradeId();
|
|
|
}
|
|
|
|
|
|
/**
|