Browse Source

Synchronization code

pull/32/head
sunkaixuan 2 years ago
parent
commit
c30fdad89d
  1. 6
      Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableHelper.cs
  2. 2
      Src/Asp.NetCore2/SqlSugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLExpressionContext.cs

6
Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableHelper.cs

@ -672,12 +672,12 @@ namespace SqlSugar
var allColumns = this.Context.EntityMaintenance.GetEntityInfo(tType)
.Columns;
var columns = allColumns
.Where(it=> this.QueryBuilder.AppendNavInfo.Result.First().result.ContainsKey("SugarNav_" + it.PropertyName))
.Where(a=> this.QueryBuilder.AppendNavInfo.Result.First().result.ContainsKey("SugarNav_" + a.PropertyName))
.ToList();
var listType = typeof(List<>).MakeGenericType(tType);
var outList=SelectNavQuery_SetList(result, it, p, tType, columns, listType);
it.GetType().GetMethod("Execute").Invoke(it, null);
SelectNavQuery_MappingList(it,result, outList, allColumns.Where(it=>it.Navigat!=null).ToList());
SelectNavQuery_MappingList(it,result, outList, allColumns.Where(a=>a.Navigat!=null).ToList());
}
}
@ -690,7 +690,7 @@ namespace SqlSugar
foreach (var item in this.QueryBuilder.AppendNavInfo.MappingNavProperties)
{
var rightName = item.Value.Name;
var rightColumnInfo = columnInfos.FirstOrDefault(it => it.PropertyName == rightName);
var rightColumnInfo = columnInfos.FirstOrDefault(a => a.PropertyName == rightName);
var rightValue=rightColumnInfo.PropertyInfo.GetValue(rightObject);
var leftName = item.Key;
//// var rightColumn=col

2
Src/Asp.NetCore2/SqlSugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLExpressionContext.cs

@ -163,7 +163,7 @@ namespace SqlSugar
case DateType.Minute:
return $" ( ( ( DATE_PART('day', {end} - {begin}) ) * 24 + DATE_PART('hour', {end} - {begin} ) ) * 60 + DATE_PART('minute', {end} - {begin} ) )";
case DateType.Second:
return $" ( ( ( DATE_PART('day', {end} - {begin}) ) * 24 + DATE_PART('hour', {end} - {begin} ) ) * 60 + DATE_PART('minute', {end} - {begin} ) ) * 60 + DATE_PART('minute', {end} - {begin} )";
return $" ( ( ( DATE_PART('day', {end} - {begin}) ) * 24 + DATE_PART('hour', {end} - {begin} ) ) * 60 + DATE_PART('minute', {end} - {begin} ) ) * 60 + DATE_PART('second', {end} - {begin} )";
case DateType.Millisecond:
break;
default:

Loading…
Cancel
Save