|
|
@@ -138,19 +138,6 @@ public class GroupServiceImpl implements GroupService {
|
|
|
return group;
|
|
|
}
|
|
|
|
|
|
- //add Group2Worker
|
|
|
- Group2Worker group2Worker = new Group2Worker();
|
|
|
- group2Worker.setGroupId(group.getId());
|
|
|
- group2Worker.setWorkerId(userId);
|
|
|
- group2Worker.setParticipantId(userId);
|
|
|
- group2Worker.setRecordCreateTime(new Timestamp(System.currentTimeMillis()));
|
|
|
- group2WorkerDao.save(group2Worker);
|
|
|
-
|
|
|
- GroupPermission groupPermission = groupPermissionService.joinGroup(userId, group.getId());
|
|
|
- if (groupPermission == null) {
|
|
|
- throw new IllegalOperationException("Can not create Group Permission!");
|
|
|
- }
|
|
|
-
|
|
|
this.privateAddUserIntoGroup(userId, group.getId());
|
|
|
return group;
|
|
|
}
|
|
|
@@ -191,15 +178,6 @@ public class GroupServiceImpl implements GroupService {
|
|
|
if (SecurityUtils.getSubject().isPermitted(new GroupPermission(permission))) {
|
|
|
throw new IllegalOperationException("Cannot join Group YOU OWN!");
|
|
|
}
|
|
|
- Group2Worker group2Worker = new Group2Worker();
|
|
|
- group2Worker.setGroupId(groupId);
|
|
|
- group2Worker.setParticipantId(userId);
|
|
|
- group2Worker.setWorkerId(userId);
|
|
|
- group2WorkerDao.save(group2Worker);
|
|
|
- GroupPermission groupPermission = groupPermissionService.joinGroup(userId, groupId);
|
|
|
- if (groupPermission == null) {
|
|
|
- throw new IllegalOperationException("Can not create Group Permission!");
|
|
|
- }
|
|
|
this.privateAddUserIntoGroup(userId, groupId);
|
|
|
return userService.findByUserId(userId);
|
|
|
}
|
|
|
@@ -329,6 +307,7 @@ public class GroupServiceImpl implements GroupService {
|
|
|
group2Worker.setGroupId(groupId);
|
|
|
group2Worker.setParticipantId(userId);
|
|
|
group2Worker.setWorkerId(userId);
|
|
|
+ group2Worker.setRecordCreateTime(new Timestamp(System.currentTimeMillis()));
|
|
|
group2WorkerDao.save(group2Worker);
|
|
|
GroupPermission groupPermission = groupPermissionService.joinGroup(userId, groupId);
|
|
|
if (groupPermission == null) {
|