底层部分方法更改

This commit is contained in:
Kimdiego2098
2023-08-08 12:31:42 +08:00
parent b1b9e51ab6
commit d6df04dd6a
23 changed files with 126 additions and 74 deletions

5
.gitignore vendored
View File

@@ -360,4 +360,7 @@ MigrationBackup/
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
FodyWeavers.xsd
/framework/*Pro*

View File

@@ -46,7 +46,7 @@ namespace ThingsGateway.Admin.Application
[AllowAnonymous, NonUnify]
public async Task<int> SwaggerCheckUrlAsync()
{
var enable = (await _configService.GetByConfigKeyAsync(ConfigConst.SYS_CONFIGBASEDEFAULT, ConfigConst.CONFIG_SWAGGERLOGIN_OPEN)).ConfigValue.ToBool();
var enable = (await _configService.GetByConfigKeyAsync(ConfigConst.SYS_CONFIGBASEDEFAULT, ConfigConst.CONFIG_SWAGGERLOGIN_OPEN)).ConfigValue.ToBoolean();
return enable ? 401 : 200;
}

View File

@@ -149,7 +149,7 @@ public class OpenApiAuthService : IOpenApiAuthService, ITransient
{
bool isSingle = false;//默认不开启单用户登录
var singleConfig = await _configService.GetByConfigKeyAsync(ConfigConst.SYS_CONFIGBASEDEFAULT, ConfigConst.CONFIG_SINGLE_OPEN);//获取系统单用户登录选项
if (singleConfig != null) isSingle = singleConfig.ConfigValue.ToBool();//如果配置不为空则设置单用户登录选项为系统配置的值
if (singleConfig != null) isSingle = singleConfig.ConfigValue.ToBoolean();//如果配置不为空则设置单用户登录选项为系统配置的值
//判断是否单用户登录
if (isSingle)

View File

@@ -79,7 +79,7 @@ public class AuthService : IAuthService
if (sysBase != null)//如果有这个配置项
{
if (sysBase.ConfigValue.ToBool())//如果需要验证码
if (sysBase.ConfigValue.ToBoolean())//如果需要验证码
{
//如果没填验证码,提示验证码不能为空
if (input.ValidCode.IsNullOrEmpty() || input.ValidCodeReqNo == 0) throw Oops.Bah("验证码不能为空").StatusCode(410);
@@ -217,7 +217,7 @@ public class AuthService : IAuthService
bool isSingle = false;//默认不开启单用户登录
var singleConfig = await _configService.GetByConfigKeyAsync(ConfigConst.SYS_CONFIGBASEDEFAULT, ConfigConst.CONFIG_SINGLE_OPEN);//获取系统单用户登录选项
if (singleConfig != null) isSingle = singleConfig.ConfigValue.ToBool();//如果配置不为空则设置单用户登录选项为系统配置的值
if (singleConfig != null) isSingle = singleConfig.ConfigValue.ToBoolean();//如果配置不为空则设置单用户登录选项为系统配置的值
if (isSingle)//判断是否单用户登录
{
await _noticeService.LogoutAsync(loginEvent.SysUser.Id, verificatInfos.Where(it => it.Device == loginEvent.Device.ToString()).ToList(), "该账号已在别处登录!");//通知其他用户下线

View File

@@ -133,7 +133,7 @@ public partial class Login
GetCaptchaInfo();
CONFIG_TITLE = (await App.GetService<IConfigService>().GetByConfigKeyAsync(ConfigConst.SYS_CONFIGBASEDEFAULT, ConfigConst.CONFIG_TITLE))?.ConfigValue;
CONFIG_REMARK = (await App.GetService<IConfigService>().GetByConfigKeyAsync(ConfigConst.SYS_CONFIGBASEDEFAULT, ConfigConst.CONFIG_REMARK))?.ConfigValue;
_showCaptcha = (await App.GetService<IConfigService>().GetByConfigKeyAsync(ConfigConst.SYS_CONFIGBASEDEFAULT, ConfigConst.CONFIG_CAPTCHA_OPEN))?.ConfigValue?.ToBool() == true;
_showCaptcha = (await App.GetService<IConfigService>().GetByConfigKeyAsync(ConfigConst.SYS_CONFIGBASEDEFAULT, ConfigConst.CONFIG_CAPTCHA_OPEN))?.ConfigValue?.ToBoolean() == true;
Welcome = "欢迎使用" + CONFIG_TITLE + "!";
await base.OnParametersSetAsync();
}

View File

@@ -22,7 +22,7 @@ public class UserManager
/// <summary>
/// 是否超级管理员
/// </summary>
public static bool IsSuperAdmin => (App.User?.FindFirst(ClaimConst.IsSuperAdmin)?.Value).ToBool();
public static bool IsSuperAdmin => (App.User?.FindFirst(ClaimConst.IsSuperAdmin)?.Value).ToBoolean();
/// <summary>
/// 当前用户账号

View File

@@ -330,7 +330,7 @@ public static class ObjectExtensions
/// 转换布尔值
/// </summary>
/// <returns></returns>
public static bool ToBool(this object value, bool defaultValue = false) => value?.ToString().ToUpper() switch
public static bool ToBoolean(this object value, bool defaultValue = false) => value?.ToString().ToUpper() switch
{
"1" or "TRUE" => true,
_ => defaultValue,
@@ -356,10 +356,22 @@ public static class ObjectExtensions
{
return Double.IsNaN(d) ? defaultValue : (Decimal)d;
}
var str = value.ToString();
var str = value?.ToString();
return str.IsNullOrEmpty() ? defaultValue : Decimal.TryParse(str, out var n) ? n : defaultValue;
}
/// <summary>
/// ToDecimal
/// </summary>
/// <returns></returns>
public static double ToDouble(this object value, double defaultValue = 0)
{
if (value is Double d)
{
return Double.IsNaN(d) ? defaultValue : (Double)d;
}
var str = value?.ToString();
return str.IsNullOrEmpty() ? defaultValue : double.TryParse(str, out var n) ? n : defaultValue;
}
/// <summary>
/// JsonElement 转 Object

View File

@@ -97,7 +97,7 @@ public static class StringExtensions
/// 转换布尔值
/// </summary>
/// <returns></returns>
public static bool ToBool(this string value, bool defaultValue = false) => value?.ToUpper() switch
public static bool ToBoolean(this string value, bool defaultValue = false) => value?.ToUpper() switch
{
"1" or "TRUE" => true,
_ => defaultValue,

View File

@@ -1026,7 +1026,7 @@
<param name="str"></param>
<returns></returns>
</member>
<member name="M:ThingsGateway.Admin.Core.ObjectExtensions.ToBool(System.Object,System.Boolean)">
<member name="M:ThingsGateway.Admin.Core.ObjectExtensions.ToBoolean(System.Object,System.Boolean)">
<summary>
转换布尔值
</summary>
@@ -1050,6 +1050,12 @@
</summary>
<returns></returns>
</member>
<member name="M:ThingsGateway.Admin.Core.ObjectExtensions.ToDouble(System.Object,System.Double)">
<summary>
ToDecimal
</summary>
<returns></returns>
</member>
<member name="M:ThingsGateway.Admin.Core.ObjectExtensions.ToObject(System.Text.Json.JsonElement)">
<summary>
JsonElement 转 Object
@@ -1142,7 +1148,7 @@
<param name="input"></param>
<returns></returns>
</member>
<member name="M:ThingsGateway.Admin.Core.StringExtensions.ToBool(System.String,System.Boolean)">
<member name="M:ThingsGateway.Admin.Core.StringExtensions.ToBoolean(System.String,System.Boolean)">
<summary>
转换布尔值
</summary>

View File

@@ -74,7 +74,7 @@ public class AlarmWorker : BackgroundService
public async Task<OperResult<SqlSugarClient>> GetAlarmDbAsync()
{
var ConfigService = ServiceHelper.Services.GetService<IConfigService>();
var alarmEnable = (await ConfigService.GetByConfigKeyAsync(ThingsGatewayConfigConst.ThingGateway_AlarmConfig_Base, ThingsGatewayConfigConst.Config_Alarm_Enable))?.ConfigValue?.ToBool();
var alarmEnable = (await ConfigService.GetByConfigKeyAsync(ThingsGatewayConfigConst.ThingGateway_AlarmConfig_Base, ThingsGatewayConfigConst.Config_Alarm_Enable))?.ConfigValue?.ToBoolean();
var alarmDbType = (await ConfigService.GetByConfigKeyAsync(ThingsGatewayConfigConst.ThingGateway_AlarmConfig_Base, ThingsGatewayConfigConst.Config_Alarm_DbType))?.ConfigValue;
var alarmConnstr = (await ConfigService.GetByConfigKeyAsync(ThingsGatewayConfigConst.ThingGateway_AlarmConfig_Base, ThingsGatewayConfigConst.Config_Alarm_ConnStr))?.ConfigValue;
@@ -132,14 +132,14 @@ public class AlarmWorker : BackgroundService
limit = string.Empty;
expressions = string.Empty;
text = string.Empty;
if (tag.BoolCloseAlarmEnable && tag.Value.ToBool() == false)
if (tag.BoolCloseAlarmEnable && tag.Value.ToBoolean() == false)
{
limit = false.ToString();
expressions = tag.BoolCloseRestrainExpressions;
text = tag.BoolCloseAlarmText;
return AlarmEnum.Close;
}
if (tag.BoolOpenAlarmEnable && tag.Value.ToBool() == true)
if (tag.BoolOpenAlarmEnable && tag.Value.ToBoolean() == true)
{
limit = true.ToString();
expressions = tag.BoolOpenRestrainExpressions;

View File

@@ -60,7 +60,7 @@ public class HistoryValueWorker : BackgroundService
public async Task<OperResult<SqlSugarClient>> GetHisDbAsync()
{
var ConfigService = ServiceHelper.Services.GetService<IConfigService>();
var hisEnable = (await ConfigService.GetByConfigKeyAsync(ThingsGatewayConfigConst.ThingGateway_HisConfig_Base, ThingsGatewayConfigConst.Config_His_Enable))?.ConfigValue?.ToBool();
var hisEnable = (await ConfigService.GetByConfigKeyAsync(ThingsGatewayConfigConst.ThingGateway_HisConfig_Base, ThingsGatewayConfigConst.Config_His_Enable))?.ConfigValue?.ToBoolean();
var hisDbType = (await ConfigService.GetByConfigKeyAsync(ThingsGatewayConfigConst.ThingGateway_HisConfig_Base, ThingsGatewayConfigConst.Config_His_DbType))?.ConfigValue;
var hisConnstr = (await ConfigService.GetByConfigKeyAsync(ThingsGatewayConfigConst.ThingGateway_HisConfig_Base, ThingsGatewayConfigConst.Config_His_ConnStr))?.ConfigValue;
@@ -458,7 +458,7 @@ public class HistoryValueMapper : IRegister
{
if (src.Value?.ToString()?.IsBoolValue() == true)
{
if (src.Value.ToBool())
if (src.Value.ToBoolean())
{
return 1;
}

View File

@@ -108,11 +108,8 @@ public abstract class ReadWriteDevicesTcpDataHandleAdapter<TRequest> : CustomDat
protected virtual FilterResult GetResponse(ByteBlock byteBlock, TRequest request, byte[] body, byte[] bytes)
{
var unpackbytes = UnpackResponse(request, request.SendBytes, body, bytes);
request.Message = unpackbytes.Message;
request.Content = unpackbytes.Content1;
request.ReceivedBytes = bytes;
request.ResultCode = unpackbytes.ResultCode;
switch (unpackbytes.Content2)
switch (unpackbytes)
{
case FilterResult.Cache:
return FilterResult.Cache;
@@ -121,15 +118,10 @@ public abstract class ReadWriteDevicesTcpDataHandleAdapter<TRequest> : CustomDat
case FilterResult.GoOn:
byteBlock.Pos = byteBlock.Len;
return FilterResult.GoOn;
default:
byteBlock.Pos = byteBlock.Len;
return FilterResult.GoOn;
}
//直接放弃
byteBlock.Pos = byteBlock.Len;
request.ReceivedBytes = bytes;
Logger?.Warning(unpackbytes.Message);
request.ResultCode = ResultCode.Error;
request.Message = unpackbytes.Message;
return FilterResult.GoOn;
}
/// <summary>
/// 发送方法,会重新建立<see cref="Request"/>
@@ -156,5 +148,5 @@ public abstract class ReadWriteDevicesTcpDataHandleAdapter<TRequest> : CustomDat
/// <summary>
/// 报文拆包
/// </summary>
protected abstract OperResult<byte[], FilterResult> UnpackResponse(TRequest request, byte[] send, byte[] body, byte[] response);
protected abstract FilterResult UnpackResponse(TRequest request, byte[] send, byte[] body, byte[] response);
}

View File

@@ -38,6 +38,8 @@ public static class LoggerExtensions
{
logger.Log(TouchSocket.Core.LogLevel.Warning, null, msg, ex);
}
/// <summary>
/// 输出警示日志
/// </summary>

View File

@@ -3,6 +3,11 @@
<PropertyGroup>
<TargetFrameworks>net45;net6.0;net7.0</TargetFrameworks>
<OpenApiGenerateDocuments>false</OpenApiGenerateDocuments>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://diego2098.gitee.io/thingsgateway-docs/</PackageProjectUrl>
<PackageTags>ThingsGateway;Diego;dotNET China;Blazor;设备采集;边缘网关</PackageTags>
<PackageOutputPath>../nupkgs</PackageOutputPath>
<AssemblyOriginatorKeyFile>..\..\snks\ThingsGateway.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

View File

@@ -10,7 +10,6 @@
//------------------------------------------------------------------------------
#endregion
using ThingsGateway.Foundation.Extension;
namespace ThingsGateway.Foundation.Adapter.Modbus;
@@ -41,43 +40,52 @@ public class ModbusRtuDataHandleAdapter : ReadWriteDevicesTcpDataHandleAdapter<M
/// <inheritdoc/>
protected override OperResult<byte[], FilterResult> UnpackResponse(ModbusRtuMessage request, byte[] send, byte[] body, byte[] response)
protected override FilterResult UnpackResponse(ModbusRtuMessage request, byte[] send, byte[] body, byte[] response)
{
//理想状态检测
var result = ModbusHelper.GetModbusRtuData(send, response, Crc16CheckEnable);
if (result.IsSuccess)
{
return OperResult.CreateSuccessResult(result.Content, FilterResult.Success);
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
return FilterResult.Success;
}
else
{
//如果返回错误,具体分析
var op = result.Copy<byte[], FilterResult>();
if (response.Length <= 1)
{
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
//如果长度不足,返回缓存
op.Content2 = FilterResult.Cache;
return op;
return FilterResult.Cache;
}
if (!(response[1] <= 0x10))
{
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
//功能码不对,返回放弃
op.Content2 = FilterResult.Success;
return op;
return FilterResult.Success;
}
else
{
if ((response.Length > response[2] + 4))
{
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
//如果长度已经超了,说明这段报文已经不能继续解析了,直接返回放弃
op.Content2 = FilterResult.Success;
return op;
return FilterResult.Success;
}
else
{
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
//否则返回缓存
op.Content2 = FilterResult.Cache;
return op;
return FilterResult.Cache;
}
}
}

View File

@@ -10,7 +10,6 @@
//------------------------------------------------------------------------------
#endregion
using ThingsGateway.Foundation.Extension;
using ThingsGateway.Foundation.Extension.Generic;
namespace ThingsGateway.Foundation.Adapter.Modbus;
@@ -69,7 +68,7 @@ public class ModbusServerDataHandleAdapter : ReadWriteDevicesTcpDataHandleAdapte
}
/// <inheritdoc/>
protected override OperResult<byte[], FilterResult> UnpackResponse(ModbusServerMessage request, byte[] send, byte[] body, byte[] response)
protected override FilterResult UnpackResponse(ModbusServerMessage request, byte[] send, byte[] body, byte[] response)
{
var result = GetModbusData(response.RemoveBegin(6));
if (result.IsSuccess)
@@ -119,14 +118,15 @@ public class ModbusServerDataHandleAdapter : ReadWriteDevicesTcpDataHandleAdapte
Length = ThingsGatewayBitConverter.ToByte(response, 11),
};
}
return OperResult.CreateSuccessResult(request.Content, FilterResult.Success);
request.ResultCode = result.ResultCode;
request.Message = result.Message;
return FilterResult.Success;
}
else
{
var op = result.Copy<byte[], FilterResult>();
op.Content2 = FilterResult.Cache;
return op;
request.ResultCode = result.ResultCode;
request.Message = result.Message;
return FilterResult.Cache;
}
}
}

View File

@@ -50,35 +50,54 @@ public class ModbusTcpDataHandleAdapter : ReadWriteDevicesTcpDataHandleAdapter<M
}
/// <inheritdoc/>
protected override OperResult<byte[], FilterResult> UnpackResponse(ModbusTcpMessage request, byte[] send, byte[] body, byte[] response)
protected override FilterResult UnpackResponse(ModbusTcpMessage request, byte[] send, byte[] body, byte[] response)
{
//理想状态检测
var result = ModbusHelper.GetModbusData(send.RemoveBegin(6), response.RemoveBegin(6));
if (result.IsSuccess)
{
return OperResult.CreateSuccessResult(result.Content, FilterResult.Success);
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
return FilterResult.Success;
}
else
{
//如果返回错误,具体分析
var op = result.Copy<byte[], FilterResult>();
if (response.Length == 9)
{
if (response[7] >= 0x80)//错误码
{
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
return FilterResult.Success;
}
}
if (response.Length < 10)
{
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
return FilterResult.Cache;
//如果长度不足,返回缓存
op.Content2 = FilterResult.Cache;
return op;
}
if ((response.Length > response[8] + 9))
{
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
return FilterResult.Success;
//如果长度已经超了,说明这段报文已经不能继续解析了,直接返回放弃
op.Content2 = FilterResult.Success;
return op;
}
else
{
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
return FilterResult.Cache;
//否则返回缓存
op.Content2 = FilterResult.Cache;
return op;
}
}

View File

@@ -10,7 +10,6 @@
//------------------------------------------------------------------------------
#endregion
using ThingsGateway.Foundation.Extension;
namespace ThingsGateway.Foundation.Adapter.Siemens;
@@ -35,7 +34,7 @@ public class SiemensS7PLCDataHandleAdapter : ReadWriteDevicesTcpDataHandleAdapte
}
/// <inheritdoc/>
protected override OperResult<byte[], FilterResult> UnpackResponse(SiemensMessage request, byte[] send, byte[] body, byte[] response)
protected override FilterResult UnpackResponse(SiemensMessage request, byte[] send, byte[] body, byte[] response)
{
var result = new OperResult<byte[]>();
if (response[2] * 256 + response[3] == 7)
@@ -57,23 +56,29 @@ public class SiemensS7PLCDataHandleAdapter : ReadWriteDevicesTcpDataHandleAdapte
}
if (result.IsSuccess)
{
return OperResult.CreateSuccessResult(result.Content, FilterResult.Success);
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
return FilterResult.Success;
}
else
{
//如果返回错误,具体分析
var op = result.Copy<byte[], FilterResult>();
if (response.Length < 21)
{
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
//如果长度不足,返回缓存
op.Content2 = FilterResult.Cache;
return op;
return FilterResult.Cache;
}
else
{
request.ResultCode = result.ResultCode;
request.Message = result.Message;
request.Content = result.Content;
//如果长度已经超了,说明这段报文已经不能继续解析了,直接返回放弃
op.Content2 = FilterResult.Success;
return op;
return FilterResult.Success;
}
}
}

View File

@@ -193,7 +193,7 @@ public class ModbusServer : UpLoadBase
if (tag.Value == null) return OperResult.CreateSuccessResult();
var enable =
GetPropertyValue(tag.Value, nameof(variablePropertys.VariableRpcEnable)).ToBool()
GetPropertyValue(tag.Value, nameof(variablePropertys.VariableRpcEnable)).ToBoolean()
&& driverPropertys.DeviceRpcEnable;
if (!enable) return new OperResult("不允许写入");
var type = GetPropertyValue(tag.Value, nameof(ModbusServerVariableProperty.ModbusType));

View File

@@ -335,7 +335,7 @@ public class IotSharpClient : UpLoadBase
if (tag != null)
{
var rpcEnable =
GetPropertyValue(tag, nameof(variablePropertys.VariableRpcEnable)).ToBool()
GetPropertyValue(tag, nameof(variablePropertys.VariableRpcEnable)).ToBoolean()
&& driverPropertys.DeviceRpcEnable;
if (rpcEnable == true)
{

View File

@@ -415,7 +415,7 @@ public class MqttClient : UpLoadBase
var tag = _uploadVariables.FirstOrDefault(a => a.Name == nv.Key);
if (tag != null)
{
var rpcEnable = GetPropertyValue(tag, nameof(variablePropertys.VariableRpcEnable)).ToBool();
var rpcEnable = GetPropertyValue(tag, nameof(variablePropertys.VariableRpcEnable)).ToBoolean();
if (rpcEnable == true)
{
var result = await _rpcCore.InvokeDeviceMethodAsync(ToString() + "-" + arg.ClientId, nv);

View File

@@ -270,7 +270,7 @@ public class MqttServer : UpLoadBase
var tag = _uploadVariables.FirstOrDefault(a => a.Name == nv.Key);
if (tag != null)
{
var rpcEnable = GetPropertyValue(tag, nameof(variablePropertys.VariableRpcEnable)).ToBool();
var rpcEnable = GetPropertyValue(tag, nameof(variablePropertys.VariableRpcEnable)).ToBoolean();
if (rpcEnable == true)
{
var result = await _rpcCore.InvokeDeviceMethodAsync(ToString() + "-" + IdWithName[arg.ClientId], nv);

View File

@@ -68,7 +68,7 @@ public class BlazorAuthorizeHandler : AppAuthorizeHandler
//这里鉴别密码是否改变
var userId = context.User.Claims.FirstOrDefault(it => it.Type == ClaimConst.UserId).Value.ToLong();
var isOpenApi = context.User.Claims.FirstOrDefault(it => it.Type == ClaimConst.IsOpenApi)?.Value?.ToBool() == true;
var isOpenApi = context.User.Claims.FirstOrDefault(it => it.Type == ClaimConst.IsOpenApi)?.Value?.ToBoolean() == true;
if (isOpenApi)
{
var _openApiUserService = App.GetService<OpenApiUserService>();
@@ -91,7 +91,7 @@ public class BlazorAuthorizeHandler : AppAuthorizeHandler
if (user == null) { return false; }
//超级管理员都能访问
if (context.User.Claims.FirstOrDefault(it => it.Type == ClaimConst.IsSuperAdmin)?.Value.ToBool() == true) return true;
if (context.User.Claims.FirstOrDefault(it => it.Type == ClaimConst.IsSuperAdmin)?.Value.ToBoolean() == true) return true;
if (context.Resource is RouteData routeData)
{
// 获取超级管理员特性
@@ -144,7 +144,7 @@ public class BlazorAuthorizeHandler : AppAuthorizeHandler
{
var userId = context.User.Claims.FirstOrDefault(it => it.Type == ClaimConst.UserId).Value;
var verificatId = context.User.Claims.FirstOrDefault(it => it.Type == ClaimConst.VerificatId)?.Value;
var isOpenApi = context.User.Claims.FirstOrDefault(it => it.Type == ClaimConst.IsOpenApi)?.Value?.ToBool(false) == true;
var isOpenApi = context.User.Claims.FirstOrDefault(it => it.Type == ClaimConst.IsOpenApi)?.Value?.ToBoolean(false) == true;
var _verificatService = App.GetService<VerificatService>();
if (isOpenApi)
{