|
|
@ -16,12 +16,33 @@ namespace SqlSugar |
|
|
|
bool isJoin = true; |
|
|
|
var value = item.First().ToString(); |
|
|
|
var obj = context.Utilities.JsonToJoinModels(value); |
|
|
|
sugarQueryable.AddJoinInfo(obj.TableName, obj.ShortName, obj.OnWhereList, obj.JoinType); |
|
|
|
AddTableInfos(obj.TableName,obj.ShortName); |
|
|
|
sugarQueryable.AddJoinInfo(obj.TableName, obj.ShortName, obj.OnWhereList, GetJoinType(item)); |
|
|
|
AddTableInfos(obj.TableName, obj.ShortName); |
|
|
|
AfterJoin(); |
|
|
|
return isJoin; |
|
|
|
} |
|
|
|
|
|
|
|
private static JoinType GetJoinType(JToken obj) |
|
|
|
{ |
|
|
|
var key = obj.Path.ToLower(); |
|
|
|
if (key.Contains("right")) |
|
|
|
{ |
|
|
|
return JoinType.Right; |
|
|
|
} |
|
|
|
else if (key.Contains("left")) |
|
|
|
{ |
|
|
|
return JoinType.Left; |
|
|
|
} |
|
|
|
else if (key.Contains("full")) |
|
|
|
{ |
|
|
|
return JoinType.Full; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
return JoinType.Inner; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void AfterJoin() |
|
|
|
{ |
|
|
|
|
|
|
|