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) {
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue