😎1、修复租户域名不能为空 2、代码整理
This commit is contained in:
parent
4c7fc4506c
commit
74d4253501
@ -60,8 +60,8 @@ public class EnumToDictJob : IJob
|
|||||||
|
|
||||||
if (newSysDictDatas.Count > 0)
|
if (newSysDictDatas.Count > 0)
|
||||||
{
|
{
|
||||||
//达梦 下用db.Insertable(newDictTypes).ExecuteCommandAsync(stoppingToken);插入400条以上会内容溢出错误,所以改用逐条插入
|
// 达梦:用db.Insertable(newDictTypes).ExecuteCommandAsync(stoppingToken);插入400条以上会内容溢出错误,所以改用逐条插入
|
||||||
//达梦 下不支持storageable2.BulkUpdateAsync 功能,注意使用
|
// 达梦:不支持storageable2.BulkUpdateAsync 功能
|
||||||
foreach (var dd in newSysDictDatas)
|
foreach (var dd in newSysDictDatas)
|
||||||
await db.Insertable(dd).ExecuteCommandAsync(stoppingToken);
|
await db.Insertable(dd).ExecuteCommandAsync(stoppingToken);
|
||||||
}
|
}
|
||||||
@ -71,8 +71,8 @@ public class EnumToDictJob : IJob
|
|||||||
|
|
||||||
if (newDictDatas.Count > 0)
|
if (newDictDatas.Count > 0)
|
||||||
{
|
{
|
||||||
//达梦 下用db.Insertable(newDictTypes).ExecuteCommandAsync(stoppingToken);插入400条以上会内容溢出错误,所以改用逐条插入
|
// 达梦:用db.Insertable(newDictTypes).ExecuteCommandAsync(stoppingToken);插入400条以上会内容溢出错误,所以改用逐条插入
|
||||||
//达梦 下不支持storageable2.BulkUpdateAsync 功能,注意使用
|
// 达梦:不支持storageable2.BulkUpdateAsync 功能
|
||||||
foreach (var dd in newDictDatas)
|
foreach (var dd in newDictDatas)
|
||||||
await db.Insertable(dd).ExecuteCommandAsync(stoppingToken);
|
await db.Insertable(dd).ExecuteCommandAsync(stoppingToken);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@ public class LoginInput
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 租户域名
|
/// 租户域名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required(ErrorMessage = "租户域名不能为空")]
|
//[Required(ErrorMessage = "租户域名不能为空")]
|
||||||
public string Host { get; set; }
|
public string Host { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -67,8 +67,8 @@ public class LoginPhoneInput
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 租户域名
|
/// 租户域名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required(ErrorMessage = "租户域名不能为空")]
|
//[Required(ErrorMessage = "租户域名不能为空")]
|
||||||
public string? Host { get; set; }
|
public string Host { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 登录模式
|
/// 登录模式
|
||||||
|
|||||||
@ -152,8 +152,6 @@ public class SysAuthService : IDynamicApiController, ITransient
|
|||||||
/// <param name="passwordErrorTimes"></param>
|
/// <param name="passwordErrorTimes"></param>
|
||||||
/// <param name="user"></param>
|
/// <param name="user"></param>
|
||||||
private void VerifyPassword(string password, string keyPasswordErrorTimes, int passwordErrorTimes, SysUser user)
|
private void VerifyPassword(string password, string keyPasswordErrorTimes, int passwordErrorTimes, SysUser user)
|
||||||
{
|
|
||||||
if (CryptogramUtil.CryptoType == CryptogramEnum.MD5.ToString())
|
|
||||||
{
|
{
|
||||||
// 国密SM2解密(前端密码传输SM2加密后的)
|
// 国密SM2解密(前端密码传输SM2加密后的)
|
||||||
try
|
try
|
||||||
@ -164,15 +162,15 @@ public class SysAuthService : IDynamicApiController, ITransient
|
|||||||
{
|
{
|
||||||
throw Oops.Oh(ErrorCodeEnum.D0010);
|
throw Oops.Oh(ErrorCodeEnum.D0010);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CryptogramUtil.CryptoType == CryptogramEnum.MD5.ToString())
|
||||||
|
{
|
||||||
if (user.Password.Equals(MD5Encryption.Encrypt(password))) return;
|
if (user.Password.Equals(MD5Encryption.Encrypt(password))) return;
|
||||||
|
|
||||||
_sysCacheService.Set(keyPasswordErrorTimes, ++passwordErrorTimes, TimeSpan.FromMinutes(30));
|
|
||||||
throw Oops.Oh(ErrorCodeEnum.D1000);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
// 国密SM2解密(前端密码传输SM2加密后的)
|
{
|
||||||
password = CryptogramUtil.SM2Decrypt(password);
|
|
||||||
if (CryptogramUtil.Decrypt(user.Password).Equals(password)) return;
|
if (CryptogramUtil.Decrypt(user.Password).Equals(password)) return;
|
||||||
|
}
|
||||||
|
|
||||||
_sysCacheService.Set(keyPasswordErrorTimes, ++passwordErrorTimes, TimeSpan.FromMinutes(30));
|
_sysCacheService.Set(keyPasswordErrorTimes, ++passwordErrorTimes, TimeSpan.FromMinutes(30));
|
||||||
throw Oops.Oh(ErrorCodeEnum.D1000);
|
throw Oops.Oh(ErrorCodeEnum.D1000);
|
||||||
|
|||||||
@ -68,6 +68,7 @@ public static class CodeGenUtil
|
|||||||
{
|
{
|
||||||
return ConvertDataType_OracleSQL(dataType, length, scale); //达梦兼容Oracle,目前先这样实现
|
return ConvertDataType_OracleSQL(dataType, length, scale); //达梦兼容Oracle,目前先这样实现
|
||||||
}
|
}
|
||||||
|
|
||||||
// OracleSQL数据类型对应的字段类型
|
// OracleSQL数据类型对应的字段类型
|
||||||
public static string ConvertDataType_OracleSQL(string dataType, int? length, int? scale)
|
public static string ConvertDataType_OracleSQL(string dataType, int? length, int? scale)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user