From 42301360644a664c27e19d848f9bdc167368b58c Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Mon, 20 Mar 2023 20:52:52 +0800 Subject: [PATCH] user update --- internal/api/msg.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/api/msg.go b/internal/api/msg.go index 2783bc13e..219b9bb72 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -153,11 +153,18 @@ func RequiredIf(fl validator.FieldLevel) bool { sessionType := fl.Parent().FieldByName("SessionType").Int() switch sessionType { case 1, 4: + log.ZDebug(context.Background(), "1", sessionType) if fl.StructFieldName() == "RecvID" { + log.ZDebug(context.Background(), "2", sessionType) + return fl.Field().String() != "" } case 2, 3: + log.ZDebug(context.Background(), "3", sessionType) + if fl.StructFieldName() == "GroupID" { + log.ZDebug(context.Background(), "4", sessionType) + return fl.Field().String() != "" } default: