Refactor code

pull/131/head
wenxu12345 3 years ago
parent b0c05fd80d
commit 4b38f0bc6b

@ -94,8 +94,10 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
}
//to group member
groupMemberTmp := imdb.GroupMember{GroupID: groupId, RoleLevel: constant.GroupOwner}
utils.CopyStructFields(&groupMemberTmp, us)
groupMember := imdb.GroupMember{GroupID: groupId, RoleLevel: constant.GroupOwner}
utils.CopyStructFields(&groupMember, us)
groupMember = groupMemberTmp
err = im_mysql_model.InsertIntoGroupMember(groupMember)
if err != nil {
log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error(), groupMember)

Loading…
Cancel
Save