From f83fd252c5e466f6e8e6e6804dd6aa90b1f2e1df Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 24 Dec 2024 20:00:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/svc/user_real_name/svc_list.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/svc/user_real_name/svc_list.go b/app/svc/user_real_name/svc_list.go index eadb7e1..1723515 100644 --- a/app/svc/user_real_name/svc_list.go +++ b/app/svc/user_real_name/svc_list.go @@ -6,6 +6,7 @@ import ( "applet/app/md" "applet/app/utils" "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" + "code.fnuoos.com/EggPlanet/egg_models.git/src/model" "github.com/gin-gonic/gin" ) @@ -78,6 +79,9 @@ func Save(c *gin.Context) { } data.State = utils.StrToInt(req.State) db.Db.Where("id=?", data.Id).Cols("state").Update(data) + if data.State == 1 { + db.Db.Where("id=?", data.Uid).Cols("is_real_name").Update(&model.User{IsRealName: 1}) + } e.OutSuc(c, "success", nil) return }