mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 16:18:47 +08:00
Update select new json
This commit is contained in:
parent
c06a06ab32
commit
e9f9b7218d
@ -667,7 +667,7 @@ namespace SqlSugar
|
|||||||
if (mappingKeys != null && mappingKeys.ContainsKey(item.Name))
|
if (mappingKeys != null && mappingKeys.ContainsKey(item.Name))
|
||||||
{
|
{
|
||||||
var key = mappingKeys[item.Name];
|
var key = mappingKeys[item.Name];
|
||||||
Json(readerValues, result, name, typeName, key);
|
Json(readerValues, result, name, typeName, key,item);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -759,7 +759,7 @@ namespace SqlSugar
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Json(Dictionary<string, object> readerValues, Dictionary<string, object> result, string name, string typeName, string shortName = null)
|
private void Json(Dictionary<string, object> readerValues, Dictionary<string, object> result, string name, string typeName, string shortName = null,PropertyInfo item=null)
|
||||||
{
|
{
|
||||||
var key = (typeName + "." + name).ToLower();
|
var key = (typeName + "." + name).ToLower();
|
||||||
if (readerValues.Any(it => it.Key.EqualCase(key)))
|
if (readerValues.Any(it => it.Key.EqualCase(key)))
|
||||||
@ -775,6 +775,15 @@ namespace SqlSugar
|
|||||||
var jsonString = readerValues.First(it => it.Key.EqualCase(key)).Value;
|
var jsonString = readerValues.First(it => it.Key.EqualCase(key)).Value;
|
||||||
AddJson(result, name, jsonString);
|
AddJson(result, name, jsonString);
|
||||||
}
|
}
|
||||||
|
else if (item != null)
|
||||||
|
{
|
||||||
|
if (readerValues.Any(it => it.Key.EqualCase(item.Name + "." + name)))
|
||||||
|
{
|
||||||
|
var jsonString = readerValues.First(it => it.Key.EqualCase(item.Name + "." + name)).Value;
|
||||||
|
AddJson(result, name, jsonString);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void Json(Dictionary<string, object> readerValues, Dictionary<string, object> result, string name, string typeName, PropertyInfo item)
|
private void Json(Dictionary<string, object> readerValues, Dictionary<string, object> result, string name, string typeName, PropertyInfo item)
|
||||||
|
Loading…
Reference in New Issue
Block a user