Commit 44052473 authored by hujiebin's avatar hujiebin

fix:漏了select

parent a28a0a76
......@@ -653,7 +653,7 @@ func GetUserGroupPower(model *domain.Model, userId uint64) (uint64, string, erro
func GetGroupPowerGroups(model *domain.Model, groupPowerId mysql.ID) ([]*group_m.GroupInfo, error) {
var res []*group_m.GroupInfo
var ownerIds []mysql.ID
if err := model.DB().Model(GroupPowerUser{}).Where("group_power_id = ?", groupPowerId).Scan(&ownerIds).Error; err != nil {
if err := model.DB().Model(GroupPowerUser{}).Select("user_id").Where("group_power_id = ?", groupPowerId).Scan(&ownerIds).Error; err != nil {
model.Log.Errorf("GetGroupPowerGroups fail:%v", err)
return nil, err
}
......@@ -666,4 +666,3 @@ func GetGroupPowerGroups(model *domain.Model, groupPowerId mysql.ID) ([]*group_m
}
return res, nil
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment