1
This commit is contained in:
@@ -39,6 +39,7 @@ using Mapster;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SqlSugar;
|
||||
|
||||
@@ -559,7 +560,17 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
|
||||
{
|
||||
try
|
||||
{
|
||||
return (await Preview(id, input)).ToObject<List<Dictionary<string, object>>>().FirstOrDefault().Keys.ToList();
|
||||
//modifyby zhoukeda 20230803
|
||||
var result = await Preview(id, input);
|
||||
if (result is DataTable)
|
||||
{
|
||||
List<Dictionary<string,Object>> list = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(JsonConvert.SerializeObject(result));
|
||||
return list.FirstOrDefault()?.Keys.ToList() ?? Enumerable.Empty<string>();
|
||||
}
|
||||
else
|
||||
{
|
||||
return result.ToObject<List<Dictionary<string, object>>>().FirstOrDefault().Keys.ToList();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user