test #6
|
@ -29,7 +29,7 @@ import (
|
|||
func main() {
|
||||
// 加载配置
|
||||
// 1.默认配置
|
||||
configPath := consts.ProductionConfigPath
|
||||
configPath := consts.MainConfigPath
|
||||
|
||||
//if os.Getenv("PROJECT_ENV") == "production" {
|
||||
// configPath = consts.ProductionConfigPath
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue