This commit is contained in:
eson 2023-08-29 15:34:38 +08:00
parent 03988243bf
commit a83486bdf3

View File

@ -15,6 +15,7 @@ import (
"github.com/474420502/requests" "github.com/474420502/requests"
"github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/core/logx"
"gorm.io/gorm"
) )
type UserEmailConfirmationLogic struct { type UserEmailConfirmationLogic struct {
@ -117,7 +118,7 @@ func (l *UserEmailConfirmationLogic) UserEmailConfirmation(req *types.RequestEma
case "fusen": case "fusen":
// log.Println("aaaa", token) // log.Println("aaaa", token)
user, err := l.svcCtx.AllModels.FsUser.RegisterByFusen(l.ctx, token) user, err := l.svcCtx.AllModels.FsUser.RegisterByFusen(l.ctx, token)
if err != nil { if err != nil && err != gorm.ErrRecordNotFound {
logx.Error(err, ":", token.TraceId) logx.Error(err, ":", token.TraceId)
return resp.SetStatus(basic.CodeDbSqlErr) return resp.SetStatus(basic.CodeDbSqlErr)
} }