Refactor code

pull/131/head
wenxu12345 3 years ago
parent 9eaa180c10
commit 479ce592fa

@ -94,10 +94,8 @@ 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}
groupMember = groupMemberTmp
utils.CopyStructFields(&groupMember, us)
err = im_mysql_model.InsertIntoGroupMember(groupMember)
if err != nil {
log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error(), groupMember)

@ -94,7 +94,7 @@ type GroupMember struct {
RoleLevel int32 `gorm:"column:role_level"`
JoinTime time.Time `gorm:"column:join_time"`
Nickname string `gorm:"column:nickname"`
FaceUrl string `gorm:"user_group_face_url"`
FaceUrl string `gorm:"column:user_group_face_url"`
JoinSource int32 `gorm:"column:join_source"`
OperatorUserID string `gorm:"column:operator_user_id"`
Ex string `gorm:"column:ex"`

Loading…
Cancel
Save