Refactor code

pull/131/head
wenxu12345 3 years ago
parent be4ba6cc69
commit e39312828c

@ -79,7 +79,7 @@ func GetGroupMemberInfoByGroupIDAndUserID(groupID, userID string) (*GroupMember,
return nil, err return nil, err
} }
var groupMember GroupMember var groupMember GroupMember
err = dbConn.Table("group_member").Where("group_id=? and user_id=? limit 1", groupID, userID).Find(&groupMember).Error err = dbConn.Table("group_member").Where("group_id=? and user_id=? ", groupID, userID).Limit(1).Find(&groupMember).Error
if err != nil { if err != nil {
return nil, err return nil, err
} }

Loading…
Cancel
Save