fix:long类型修复

This commit is contained in:
陈淳
2023-03-30 13:42:57 +08:00
parent 6b2ef71296
commit ba220e9d55
5 changed files with 50 additions and 9 deletions

View File

@@ -7,9 +7,13 @@ using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using SqlSugar;
namespace Yi.Framework.Data.Json
{
/// <summary>
/// 长整形转字符串
/// </summary>
public class LongToStringConverter : JsonConverter<long>
{
public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
@@ -26,6 +30,7 @@ namespace Yi.Framework.Data.Json
{
return number;
}
return 0;
}
return reader.GetInt64();
@@ -37,3 +42,4 @@ namespace Yi.Framework.Data.Json
}
}
}

View File

@@ -102,7 +102,7 @@ namespace Yi.RBAC.Application.Identity
private void ValidationPhoneCaptcha(RegisterDto input)
{
var value = _cacheManager.Get<string>($"Yi:Phone:{input.Phone}");
if (value is not null && value.Equals($"{input.Code}:{input.Uuid}"))
if (value is not null && value.Equals($"{input.Code}"))
{
return;
}
@@ -212,7 +212,7 @@ namespace Yi.RBAC.Application.Identity
{
code = "8888";
}
_cacheManager.Set($"Yi:Phone:{input.Phone}", $"{code}:{uuid}", new TimeSpan(0, 10, 0));
_cacheManager.Set($"Yi:Phone:{input.Phone}", $"{code}", new TimeSpan(0, 10, 0));
return new { Uuid = uuid };

View File

@@ -33,7 +33,7 @@
</summary>
<param name="str_handset"></param>
</member>
<member name="M:Yi.RBAC.Application.Identity.AccountService.PostCaptchatPhone(Yi.RBAC.Application.Contracts.Identity.Dtos.Account.PhoneCaptchaImageDto)">
<member name="M:Yi.RBAC.Application.Identity.AccountService.PostCaptchaPhone(Yi.RBAC.Application.Contracts.Identity.Dtos.Account.PhoneCaptchaImageDto)">
<summary>
注册 手机验证码
</summary>