Ver código fonte

冲突解决

Lishi
pry 2 anos atrás
pai
commit
0f5251416a
2 arquivos alterados com 13 adições e 12 exclusões
  1. +7
    -5
      HKLib/DB/DbContext.cs
  2. +6
    -7
      HKLib/Interfaces/HKLibHelper.cs

+ 7
- 5
HKLib/DB/DbContext.cs Ver arquivo

@@ -15,7 +15,7 @@ namespace HKLib.DB
{
public static SqlSugarScope Context = new SqlSugarScope(new ConnectionConfig()
{
ConnectionString = Route(),
ConnectionString = Route,
DbType = DbType.Sqlite,//数据库类型
IsAutoCloseConnection = true //不设成true要手动close
}, db =>
@@ -26,11 +26,13 @@ namespace HKLib.DB
};
});

static string Route()
public static string Route
{
var dir = SyncStatic.CreateDir(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Database"));
var r = SyncStatic.CreateFile(Path.Combine(dir, "data.db3"));
return r;
get
{
var dir = SyncStatic.CreateDir(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Database"));
return $"DataSource={SyncStatic.CreateFile(Path.Combine(dir, "Data.db3"))}";
}
}
public static void InitTable()
{


+ 6
- 7
HKLib/Interfaces/HKLibHelper.cs Ver arquivo

@@ -15,13 +15,12 @@ namespace HKLib.Interfaces
/// </summary>
public static bool SetTime(TimeSpilte input)
{
IHttpMultiClient.HttpMulti.AddNode(t =>
{
t.NodePath = $"{Configer.SaasRoute}";
t.JsonParam = input.ToJson();
t.ReqType = MultiType.POST;
}).Build().RunStringFirst();
return true;
return IHttpMultiClient.HttpMulti.AddNode(t =>
{
t.NodePath = $"{Configer.SaasRoute}";
t.JsonParam = input.ToJson();
t.ReqType = MultiType.POST;
}).Build().RunStringFirst().ToModel<JObject>()["isSuccess"].ToString().AsBool();
}

/// <summary>


Carregando…
Cancelar
Salvar