Ver a proveniência

update

adv_callback
dengbiao há 2 semanas
ascendente
cometimento
392e18441a
2 ficheiros alterados com 19 adições e 6 eliminações
  1. +17
    -4
      app/hdl/hdl_login.go
  2. +2
    -2
      go.mod

+ 17
- 4
app/hdl/hdl_login.go Ver ficheiro

@@ -1,6 +1,7 @@
package hdl

import (
"applet/app/cfg"
"applet/app/db"
"applet/app/e"
"applet/app/lib/validate"
@@ -12,6 +13,8 @@ import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/model"
"code.fnuoos.com/EggPlanet/egg_system_rules.git/aliyun"
"code.fnuoos.com/EggPlanet/egg_system_rules.git/enum"
md3 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md"
"code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit"
"fmt"
"github.com/gin-gonic/gin"
"time"
@@ -234,10 +237,12 @@ func Register(c *gin.Context) {
data := svc.AliyunSmsBase(c, "")
//校验短信
err = aliyun.AliyunCheckSms(data["aliyun_sms_id"], data["aliyun_sms_secret"], req.Mobile, req.Code)
//if err != nil {
// e.OutErr(c, 400, e.NewErr(400, "验证码错误,请重试"))
// return
//}
if cfg.Prd {
if err != nil {
e.OutErr(c, 400, e.NewErr(400, "验证码错误,请重试"))
return
}
}
commReq(c, req)
}

@@ -402,6 +407,14 @@ func commReq(c *gin.Context, req md.RegisterReq) {
if parentUid > 0 {
//TODO::推入mq异步处理
}
//TODO::推入mq处理
ch, err := rabbit.Cfg.Pool.GetChannel()
if err != nil {
e.OutErr(c, e.ERR_INIT_RABBITMQ, err1.Error())
return
}
defer ch.Release()
ch.Publish(md3.EggAppExchange, utils.SerializeStr(md3.EggNewUserRegisterData{Uid: user.Id}), md3.EggNewUserRegister)
}

token, err := svc.HandleLoginToken(user)


+ 2
- 2
go.mod Ver ficheiro

@@ -4,7 +4,7 @@ go 1.19

//replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models

//replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules
replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules

require (
github.com/boombuler/barcode v1.0.1
@@ -32,7 +32,7 @@ require (
)

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241204145112-7b4c29691a6d
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241205041102-0e106357c399
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241205020101-e9fa2d461875
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


Carregando…
Cancelar
Guardar