fix queryservice verifyCode mobile encrypte
This commit is contained in:
		| @@ -1300,7 +1300,12 @@ func (l *QueryServiceLogic) VerifyCode(mobile string, code string) error { | ||||
| 	if mobile == "17776203797" && code == "123456" { | ||||
| 		return nil | ||||
| 	} | ||||
| 	codeRedisKey := fmt.Sprintf("%s:%s", "query", mobile) | ||||
| 	secretKey := l.svcCtx.Config.Encrypt.SecretKey | ||||
| 	encryptedMobile, err := crypto.EncryptMobile(mobile, secretKey) | ||||
| 	if err != nil { | ||||
| 		return errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "加密手机号失败: %+v", err) | ||||
| 	} | ||||
| 	codeRedisKey := fmt.Sprintf("%s:%s", "query", encryptedMobile) | ||||
| 	cacheCode, err := l.svcCtx.Redis.Get(codeRedisKey) | ||||
| 	if err != nil { | ||||
| 		if errors.Is(err, redis.Nil) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user