fix 升级changedb; 处理人脸token解析问题

This commit is contained in:
2024-02-26 16:48:04 +08:00
parent 55b6e957fe
commit b7a6e5e8db
6 changed files with 31 additions and 10 deletions

View File

@@ -229,7 +229,7 @@ public class GainfoService : IGainfoService
Face = request.Face
};
await dbContext.Insertable(face).ExecuteCommandAsync();
await dbContext.InsertAsync(face);
}
else
{
@@ -240,7 +240,7 @@ public class GainfoService : IGainfoService
}
face.Face = request.Face;
await dbContext.Updateable(face).ExecuteCommandAsync();
await dbContext.UpdateAsync(face);
}
//生成任务
@@ -270,7 +270,7 @@ public class GainfoService : IGainfoService
Face = request.Face
};
await dbContext.Insertable(face).ExecuteCommandAsync();
await dbContext.InsertAsync(face);
}
else
{
@@ -281,7 +281,7 @@ public class GainfoService : IGainfoService
}
face.Face = request.Face;
await dbContext.Updateable(face).ExecuteCommandAsync();
await dbContext.UpdateAsync(face);
}
//生成任务

View File

@@ -13,7 +13,7 @@ public class DataProtectionJobPack : BaseAppPack
{
var redisConnection = ConnectionMultiplexer.Connect(Configuration.GetSection($"{nameof(RedisOptions)}:{nameof(RedisOptions.ConnectionString)}").Value);
services.AddDataProtection()
.SetApplicationName("basic")
.SetApplicationName("yiliantong")
.PersistKeysToStackExchangeRedis(redisConnection, "DataProtection-Keys");
}
}

View File

@@ -65,8 +65,8 @@ public class SqlSugarPack : BaseAppPack
db.Client.CodeFirst.InitTables(tables);
var faceDb = db.ChangeDb("face");
faceDb.DbMaintenance.CreateDatabase();
faceDb.CodeFirst.InitTables<GainfoFaceEntity>();
faceDb.Client.DbMaintenance.CreateDatabase();
faceDb.Client.CodeFirst.InitTables<GainfoFaceEntity>();
}
}

View File

@@ -11,7 +11,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Kurisu.SqlSugar" Version="0.1.0" />
<PackageReference Include="Kurisu.SqlSugar" Version="0.1.1" />
</ItemGroup>
</Project>

View File

@@ -27,7 +27,7 @@ public class Startup : DefaultStartup
var reidConnection = Configuration.GetSection($"{nameof(RedisOptions)}:{nameof(RedisOptions.ConnectionString)}").Value;
var redis = ConnectionMultiplexer.Connect(reidConnection);
services.AddDataProtection()
.SetApplicationName("scheduled")
.SetApplicationName("yiliantong")
.PersistKeysToStackExchangeRedis(redis, "DataProtection-Keys");
}

View File

@@ -13,7 +13,28 @@ public class SqlSugarPack : BaseAppPack
public override void ConfigureServices(IServiceCollection services)
{
services.AddSqlSugar();
services.AddSqlSugar(sp =>
{
var configuration = sp.GetService<IConfiguration>();
return new List<ConnectionConfig>
{
new ConnectionConfig
{
ConfigId = "identity",
ConnectionString = configuration.GetSection("SqlSugarOptions:IdentityConnectionString").Value,
DbType = DbType.MySql,
InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true,
MoreSettings = new ConnMoreSettings
{
DisableNvarchar = true,
}
}
};
});
}
}