bug处理

This commit is contained in:
2024-04-23 10:16:16 +08:00
parent c8e2f1eafd
commit 579f2d3a39
197 changed files with 2509 additions and 1363 deletions

View File

@@ -47,6 +47,8 @@ namespace JNPF.Systems;
/// <summary>
/// 数据接口
/// 版 本V3.2
/// 版 权引迈信息技术有限公司https://www.jnpfsoft.com
/// 作 者JNPF开发平台组
/// 日 期2021-06-01.
/// </summary>
[ApiDescriptionSettings(Tag = "System", Name = "DataInterface", Order = 204)]
@@ -312,7 +314,6 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
/// <returns></returns>
[HttpPost("{id}/Actions/Preview")]
[UnitOfWork]
[AllowAnonymous]
public async Task<dynamic> Preview(string id, [FromBody] DataInterfacePreviewInput input)
{
_configId = _userManager.TenantId;
@@ -324,11 +325,6 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
{
dicParameters = input.paramList.ToDictionary(x => x.field, y => y.defaultValue);
}
if (!string.IsNullOrEmpty(info.Path) && !info.Path.StartsWith("http"))
{
info.Path = $"{App.HttpContext.Request.Scheme}://{App.HttpContext.Request.Host}{info.Path}";
}
VerifyRequired(info, dicParameters);
ReplaceParameterValue(info, dicParameters);
if (info?.DataType == 1)
@@ -562,7 +558,6 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
[UnitOfWork]
public async Task<dynamic> GetFields(string id, [FromBody] DataInterfacePreviewInput input)
{
Object tempObj = null;
try
{
//modifyby zhoukeda 20230803
@@ -574,22 +569,12 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
}
else
{
tempObj = result;
var list = result.ToObject<List<Dictionary<string, object>>>().FirstOrDefault().Keys.ToList();
return list;
return result.ToObject<List<Dictionary<string, object>>>().FirstOrDefault().Keys.ToList();
}
}
catch (Exception e)
{
try
{
return JsonConvert.DeserializeObject<List<Dictionary<string,object>>>(JsonConvert.SerializeObject(tempObj)).FirstOrDefault().Keys.ToList();
}
catch (Exception exception)
{
throw Oops.Oh(ErrorCode.COM1020);
}
throw Oops.Oh(ErrorCode.COM1020);
}
}
#endregion