|
@@ -178,7 +178,9 @@ public class GroupLogicImpl extends BaseLogic implements GroupLogic {
|
|
List<UserVO> userVOs=new ArrayList<UserVO>();
|
|
List<UserVO> userVOs=new ArrayList<UserVO>();
|
|
List<User> users=groupService.getUserByGroupId(groupId);
|
|
List<User> users=groupService.getUserByGroupId(groupId);
|
|
users.stream().forEach(user -> {
|
|
users.stream().forEach(user -> {
|
|
- userVOs.add(Converter.convert(UserVO.class,user));
|
|
|
|
|
|
+ UserVO uv = Converter.convert(UserVO.class,user);
|
|
|
|
+ uv.setPassword("");
|
|
|
|
+ userVOs.add(uv);
|
|
});
|
|
});
|
|
return userVOs;
|
|
return userVOs;
|
|
}
|
|
}
|
|
@@ -241,6 +243,7 @@ public class GroupLogicImpl extends BaseLogic implements GroupLogic {
|
|
else{
|
|
else{
|
|
Group g=Converter.convert(Group.class,groupVO);
|
|
Group g=Converter.convert(Group.class,groupVO);
|
|
g.setManagerId(-1L);
|
|
g.setManagerId(-1L);
|
|
|
|
+ g.setIsActive(true);
|
|
Group group = groupService.save(g);
|
|
Group group = groupService.save(g);
|
|
groupPermissionService.createGroup(user.getId(),group.getId());
|
|
groupPermissionService.createGroup(user.getId(),group.getId());
|
|
return Converter.convert(GroupVO.class,group);
|
|
return Converter.convert(GroupVO.class,group);
|
|
@@ -256,7 +259,7 @@ public class GroupLogicImpl extends BaseLogic implements GroupLogic {
|
|
}
|
|
}
|
|
long managerId = group.getOwnerId();
|
|
long managerId = group.getOwnerId();
|
|
if(!groupService.checkManagerGroupSize(managerId)) {
|
|
if(!groupService.checkManagerGroupSize(managerId)) {
|
|
- throw new HttpBadRequestException("Over max group size");
|
|
|
|
|
|
+ throw new HttpBadRequestException("老师份额已使用完");
|
|
}
|
|
}
|
|
if ( groupVO.getCaptcha()!=null && ( groupVO.getCaptcha().equals("summer") || CaptchaUtils.verifyPictureCaptcha(request, groupVO.getCaptcha()))) {
|
|
if ( groupVO.getCaptcha()!=null && ( groupVO.getCaptcha().equals("summer") || CaptchaUtils.verifyPictureCaptcha(request, groupVO.getCaptcha()))) {
|
|
String managerName = groupVO.getManagerName();
|
|
String managerName = groupVO.getManagerName();
|
|
@@ -322,7 +325,7 @@ public class GroupLogicImpl extends BaseLogic implements GroupLogic {
|
|
throw new HttpBadRequestException("班级已关闭");
|
|
throw new HttpBadRequestException("班级已关闭");
|
|
}
|
|
}
|
|
if(!groupService.checkManagerGroupSize(group.getOwnerId())) {
|
|
if(!groupService.checkManagerGroupSize(group.getOwnerId())) {
|
|
- throw new HttpBadRequestException("Over max group size");
|
|
|
|
|
|
+ throw new HttpBadRequestException("老师份额已使用完");
|
|
}
|
|
}
|
|
User user=userService.findByUsername(userName);
|
|
User user=userService.findByUsername(userName);
|
|
if(user==null){
|
|
if(user==null){
|