后台面板

This commit is contained in:
2025-06-09 12:34:52 +08:00
parent 89bade9232
commit 19c82817ba
375 changed files with 20628 additions and 11903 deletions

View File

@@ -4,9 +4,9 @@ import (
"context"
"database/sql"
"fmt"
"qnc-server/app/user/cmd/api/internal/svc"
"qnc-server/app/user/cmd/api/internal/types"
"qnc-server/app/user/model"
"qnc-server/app/main/api/internal/svc"
"qnc-server/app/main/api/internal/types"
"qnc-server/app/main/model"
jwtx "qnc-server/common/jwt"
"qnc-server/common/tool"
"qnc-server/common/xerr"
@@ -64,8 +64,8 @@ func (l *RegisterLogic) Register(req *types.RegisterReq) (resp *types.RegisterRe
if transErr := l.svcCtx.UserModel.Trans(l.ctx, func(ctx context.Context, session sqlx.Session) error {
user := new(model.User)
user.Mobile = sql.NullString{String: encryptedMobile, Valid: true}
// if len(user.Nickname) == 0 {
// user.Nickname = encryptedMobile
// if len(main.Nickname) == 0 {
// main.Nickname = encryptedMobile
// }
if len(req.Password) > 0 {
user.Password = lzUtils.StringToNullString(tool.Md5ByString(req.Password))
@@ -76,7 +76,7 @@ func (l *RegisterLogic) Register(req *types.RegisterReq) (resp *types.RegisterRe
}
lastId, lastInsertIdErr := insertResult.LastInsertId()
if lastInsertIdErr != nil {
return errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "手机注册, 获取新用户ID失败, err:%+v, user:%+v", lastInsertIdErr, user)
return errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "手机注册, 获取新用户ID失败, err:%+v, main:%+v", lastInsertIdErr, user)
}
userId = lastId