|
@@ -266,6 +266,12 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public boolean editUserGrade(ClassGradeUserAddQueryBo bo) {
|
|
public boolean editUserGrade(ClassGradeUserAddQueryBo bo) {
|
|
|
|
+ ClassGradeQueryBo classGradeQueryBo = new ClassGradeQueryBo();
|
|
|
|
+ classGradeQueryBo.setGradeId(bo.getGradeId());
|
|
|
|
+ ClassGradeVo classGradeVo = entity2Vo(baseMapper.queryList(classGradeQueryBo)).get(0);
|
|
|
|
+ if ((classGradeVo.getStudentUpper() - classGradeVo.getStudentNum()) < bo.getUserId().length){
|
|
|
|
+ throw new IllegalArgumentException("当前班级超出上限,不允许添加这么多学员");
|
|
|
|
+ }
|
|
for (Long aLong : bo.getUserId()) {
|
|
for (Long aLong : bo.getUserId()) {
|
|
//防止再次进入相同班级,不可进入已经在有效期内班级进入另外一个班级
|
|
//防止再次进入相同班级,不可进入已经在有效期内班级进入另外一个班级
|
|
ClassGradeUserQueryBo classGradeUserQueryBo = new ClassGradeUserQueryBo();
|
|
ClassGradeUserQueryBo classGradeUserQueryBo = new ClassGradeUserQueryBo();
|