From 2a75ec96ca72474e57abf0314566245df6042a06 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 19 Sep 2024 11:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hdl/hdl_login.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/app/hdl/hdl_login.go b/app/hdl/hdl_login.go index 70b4db4..bd8b55b 100644 --- a/app/hdl/hdl_login.go +++ b/app/hdl/hdl_login.go @@ -131,11 +131,11 @@ func Register(c *gin.Context) { return } engine := db.DBs[svc.GetMasterId(c)] - //check, err := svc.SmsCheck(c, req.UserName, req.Captcha) - //if check == false { - // e.OutErr(c, 400, e.NewErr(400, err.Error())) - // return - //} + check, err := svc.SmsCheck(c, req.UserName, req.Captcha) + if check == false { + e.OutErr(c, 400, e.NewErr(400, err.Error())) + return + } now := time.Now() //1、判断当前账号是否已存在 mediumDb := implement.NewMediumDb(engine) @@ -221,11 +221,7 @@ func Register(c *gin.Context) { //5、判断是否为渠道代理邀请 if req.AgentId != "" { agentDb := implement.NewAgentDb(engine) - agent, err1 := agentDb.GetAgent(utils.StrToInt(req.AgentId)) - if err1 != nil { - e.OutErr(c, e.ERR_DB_ORM, err1.Error()) - return - } + agent := agentDb.GetSuperAdmin(utils.StrToInt(req.AgentId)) if agent != nil { //5.1 新增agent_with_medium记录 agentWithMediumDb := implement2.NewAgentWithMediumDb(engine)