|
@@ -37,15 +37,7 @@ func (*groupRepo) Get(groupId int64) (*model.Group, error) { |
|
|
|
|
|
|
|
|
// GetForBanned 获取群组禁言用户信息 |
|
|
// GetForBanned 获取群组禁言用户信息 |
|
|
func (*groupRepo) GetForBanned(groupId int64) (*model.Group, error) { |
|
|
func (*groupRepo) GetForBanned(groupId int64) (*model.Group, error) { |
|
|
group, err := GroupCache.Get(groupId) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
return nil, err |
|
|
|
|
|
} |
|
|
|
|
|
if group != nil { |
|
|
|
|
|
return group, nil |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
group, err = GroupDao.Get(groupId) |
|
|
|
|
|
|
|
|
group, err := GroupDao.Get(groupId) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return nil, err |
|
|
return nil, err |
|
|
} |
|
|
} |
|
@@ -54,11 +46,6 @@ func (*groupRepo) GetForBanned(groupId int64) (*model.Group, error) { |
|
|
return nil, err |
|
|
return nil, err |
|
|
} |
|
|
} |
|
|
group.Members = members |
|
|
group.Members = members |
|
|
|
|
|
|
|
|
err = GroupCache.Set(group) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
return nil, err |
|
|
|
|
|
} |
|
|
|
|
|
return group, nil |
|
|
return group, nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|