|
|
@@ -28,7 +28,13 @@ func (*groupRepo) Get(groupId int64) (*model.Group, error) { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
group.Members = members |
|
|
|
|
|
|
|
if group.UserNum != int32(len(group.Members)) { |
|
|
|
group.UserNum = int32(len(group.Members)) |
|
|
|
err = GroupRepo.Save(group) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
} |
|
|
|
err = GroupCache.Set(group) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|