fix(camel_oil): 修正手机号存在判断逻辑

- 将手机号存在判断条件由 existingAccount == nil 修改为 existingAccount != nil
- 确保手机号已存在时返回错误提示,避免重复使用该手机号
- 优化账号登录逻辑中的手机号校验流程
This commit is contained in:
danial
2025-12-06 21:34:46 +08:00
parent 8fc3c2a1cb
commit 8c84aeabf1

View File

@@ -38,7 +38,7 @@ func (s *sCamelOil) LoginAccount(ctx context.Context) (err error) {
}
// 如果手机号已存在,继续获取新的手机号
if existingAccount == nil {
if existingAccount != nil {
// 手机号不存在,可以使用
return errors.New("手机号已存在,重新获取")
}