From 69c89182212d9c18a1b9cb8eab045ef88a4e5f21 Mon Sep 17 00:00:00 2001 From: maxbad <26058031@qq.com> Date: Sun, 28 May 2023 16:30:27 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/internal/logic/admin/member.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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()