test #6
|
@ -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) {
|
func (m *Mongo) GetLoginListByPhoneHash(ctx *gin.Context, req *loginproto.OpListByPhoneHashReq) (*dbstruct.Login, error) {
|
||||||
login := &dbstruct.Login{}
|
login := &dbstruct.Login{}
|
||||||
col := m.getColLogin()
|
col := m.getColLogin()
|
||||||
|
logger.Info("phone_hash:%v region_code:%v", req.PhoneHash, req.RegionCode)
|
||||||
query := qmgo.M{
|
query := qmgo.M{
|
||||||
"phone_hash": req.PhoneHash,
|
"phone_hash": req.PhoneHash,
|
||||||
"region_code": req.RegionCode,
|
"region_code": req.RegionCode,
|
||||||
"del_flag": 0,
|
"del_flag": 0,
|
||||||
}
|
}
|
||||||
err := col.Find(ctx, query).One(login)
|
err := col.Find(ctx, query).One(login)
|
||||||
|
logger.Info("login:%v", login)
|
||||||
if err == qmgo.ErrNoSuchDocuments {
|
if err == qmgo.ErrNoSuchDocuments {
|
||||||
err = nil
|
err = nil
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue