From be1c2172b102e19d3ea156958b0c04f3b7162ede Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 6 Dec 2024 17:36:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hdl/hdl_login.go | 8 +++++++- go.mod | 5 ++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/hdl/hdl_login.go b/app/hdl/hdl_login.go index 967be41..2e9ad72 100644 --- a/app/hdl/hdl_login.go +++ b/app/hdl/hdl_login.go @@ -369,6 +369,12 @@ func commReq(c *gin.Context, req md.RegisterReq) { if req.Avatar == "" { req.Avatar = svc.GetSysCfgStr("default_avatar") } + NewUserLevelDb := implement.NewUserLevelDb(db.Db) + userLevel, _ := NewUserLevelDb.UserLevelInIDescByWeightLowWithOne() + level := 0 + if userLevel != nil { + level = userLevel.Id + } user = &model.User{ Phone: req.Mobile, UnionId: req.UnionId, @@ -377,7 +383,7 @@ func commReq(c *gin.Context, req md.RegisterReq) { Avatar: req.Avatar, Password: "", Passcode: "", - Level: 0, + Level: level, InviteTotal: 0, State: int(enum.UserStateForNormal), LastLoginIp: ip, diff --git a/go.mod b/go.mod index 90d7d98..71f6194 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/go-playground/universal-translator v0.18.1 github.com/go-playground/validator/v10 v10.20.0 github.com/go-redis/redis v6.15.9+incompatible - github.com/gomodule/redigo v2.0.0+incompatible + github.com/gomodule/redigo v1.9.2 github.com/jinzhu/copier v0.4.0 github.com/makiuchi-d/gozxing v0.0.0-20210324052758-57132e828831 github.com/qiniu/api.v7/v7 v7.8.2 @@ -33,11 +33,10 @@ require ( require ( code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241205080507-c27ed1ab5226 - code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241205061938-91f42710d6cd + code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241206071703-50c6d6499467 code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible - github.com/gin-contrib/sessions v1.0.1 github.com/go-pay/crypto v0.0.1 github.com/go-pay/gopay v1.5.101 github.com/go-pay/xlog v0.0.2