fix 升级changedb; 处理人脸token解析问题
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
//生成任务
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Kurisu.SqlSugar" Version="0.1.0" />
|
||||
<PackageReference Include="Kurisu.SqlSugar" Version="0.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user