diff --git a/server/internal/logic/admin/member.go b/server/internal/logic/admin/member.go index d73d408..28f9cef 100644 --- a/server/internal/logic/admin/member.go +++ b/server/internal/logic/admin/member.go @@ -491,10 +491,9 @@ func (s *sAdminMember) Edit(ctx context.Context, in adminin.MemberEditInp) (err } // 默认头像 - if in.Avatar == "" { - in.Avatar = config.Avatar + if data.Avatar == "" { + data.Avatar = config.Avatar } - data.MemberEditInp = in return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { id, err := dao.AdminMember.Ctx(ctx).Data(data).InsertAndGetId()