feat: 框架代码同步 (#129)

[skip ci]
This commit is contained in:
2024-05-29 14:40:10 +08:00
committed by GitHub
parent d9c7085472
commit b01b8b24ba
29 changed files with 223 additions and 40 deletions

View File

@ -291,7 +291,7 @@ public sealed class UserService(
}
if (user.Mobile != req.VerifySmsCodeReq.DestDevice) {
throw new NetAdminInvalidOperationException($"{Ln.手机号不正确}");
throw new NetAdminInvalidOperationException($"{Ln.手机号不正确}");
}
}
@ -330,17 +330,17 @@ public sealed class UserService(
if (!user.Mobile.NullOrEmpty()) {
// 已有手机号,需验证旧手机
if (!await verifyCodeService.VerifyAsync(req.OriginVerifySmsCodeReq).ConfigureAwait(false)) {
throw new NetAdminInvalidOperationException($"{Ln.旧手机号验证码不正确}");
throw new NetAdminInvalidOperationException($"{Ln.旧手机号验证码不正确}");
}
if (user.Mobile != req.OriginVerifySmsCodeReq.DestDevice) {
throw new NetAdminInvalidOperationException($"{Ln.旧手机号不正确}");
throw new NetAdminInvalidOperationException($"{Ln.旧手机号不正确}");
}
}
// 验证新手机号
if (!await verifyCodeService.VerifyAsync(req.NewVerifySmsCodeReq).ConfigureAwait(false)) {
throw new NetAdminInvalidOperationException($"{Ln.新手机号验证码不正确}");
throw new NetAdminInvalidOperationException($"{Ln.新手机号验证码不正确}");
}
if (await Rpo.UpdateDiy