test #6

Closed
chenhao wants to merge 3 commits from test into main
3 changed files with 4 additions and 2 deletions

View File

@ -29,7 +29,7 @@ import (
func main() {
// 加载配置
// 1.默认配置
configPath := consts.ProductionConfigPath
configPath := consts.MainConfigPath
//if os.Getenv("PROJECT_ENV") == "production" {
// configPath = consts.ProductionConfigPath

View File

@ -746,12 +746,14 @@ func (m *Mongo) DeleteLogin(ctx *gin.Context, id int64) error {
func (m *Mongo) GetLoginListByPhoneHash(ctx *gin.Context, req *loginproto.OpListByPhoneHashReq) (*dbstruct.Login, error) {
login := &dbstruct.Login{}
col := m.getColLogin()
logger.Info("phone_hash:%v region_code:%v", req.PhoneHash, req.RegionCode)
query := qmgo.M{
"phone_hash": req.PhoneHash,
"region_code": req.RegionCode,
"del_flag": 0,
}
err := col.Find(ctx, query).One(login)
logger.Info("login:%v", login)
if err == qmgo.ErrNoSuchDocuments {
err = nil
return nil, err

View File

@ -39,7 +39,7 @@ func (s *Service) utilRegisterUser(ctx *gin.Context, req *loginproto.MobilePhone
return
}
account.UserId = goproto.Int64(userIdSeq.UserId)
account.Name = goproto.String(fmt.Sprintf("user_%v", userIdSeq.UserId))
account.Name = goproto.String(fmt.Sprintf("用户%v", userIdSeq.UserId))
account.MobilePhone = goproto.String(req.MobilePhone)
account.RegionCode = goproto.String(req.RegionCode)
account.PhoneHash = goproto.String(req.PhoneHash)