fix 添加用户

This commit is contained in:
maxbad 2023-05-28 16:30:27 +08:00
parent ed17cd8bfa
commit 69c8918221

View File

@ -491,10 +491,9 @@ func (s *sAdminMember) Edit(ctx context.Context, in adminin.MemberEditInp) (err
} }
// 默认头像 // 默认头像
if in.Avatar == "" { if data.Avatar == "" {
in.Avatar = config.Avatar data.Avatar = config.Avatar
} }
data.MemberEditInp = in
return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) {
id, err := dao.AdminMember.Ctx(ctx).Data(data).InsertAndGetId() id, err := dao.AdminMember.Ctx(ctx).Data(data).InsertAndGetId()