mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-25 01:14:33 +08:00
Synchronization code
This commit is contained in:
parent
c0d361e588
commit
f492e2e581
@ -671,7 +671,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Json(readerValues, result, name, typeName);
|
Json(readerValues, result, name, typeName,item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (columns.Any(it => it.IsJson))
|
else if (columns.Any(it => it.IsJson))
|
||||||
@ -777,6 +777,24 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void Json(Dictionary<string, object> readerValues, Dictionary<string, object> result, string name, string typeName, PropertyInfo item)
|
||||||
|
{
|
||||||
|
var key = (typeName + "." + name).ToLower();
|
||||||
|
if (readerValues.Any(it => it.Key.EqualCase(key)))
|
||||||
|
{
|
||||||
|
var jsonString = readerValues.First(it => it.Key.EqualCase(key)).Value;
|
||||||
|
AddJson(result, name, jsonString);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
key = (item.Name + "." + name).ToLower();
|
||||||
|
if (readerValues.Any(it => it.Key.EqualCase(key)))
|
||||||
|
{
|
||||||
|
var jsonString = readerValues.First(it => it.Key.EqualCase(key)).Value;
|
||||||
|
AddJson(result, name, jsonString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void AddJson(Dictionary<string, object> result, string name, object jsonString)
|
private void AddJson(Dictionary<string, object> result, string name, object jsonString)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user