From 098614c3a14e65b799150ca49e78d2ee7cd10536 Mon Sep 17 00:00:00 2001 From: Kai Date: Thu, 17 Jun 2021 23:03:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E8=87=AA=E5=8B=95?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8C=87=E5=AE=9Atable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SolarPower/Helper/DatabaseHelper.cs | 2 +- SolarPower/Repository/Implement/PowerStationRepository.cs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/SolarPower/Helper/DatabaseHelper.cs b/SolarPower/Helper/DatabaseHelper.cs index 2e57aa3..b359893 100644 --- a/SolarPower/Helper/DatabaseHelper.cs +++ b/SolarPower/Helper/DatabaseHelper.cs @@ -37,7 +37,7 @@ namespace SolarPower.Helper var passwordStr = ed.DESDecrypt(dbConfig.Password); //var connStr = $"server={serverStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;"; - var connStr = @"server=127.0.0.1;port=3308;database=solar_power;user=root;password=00000000;charset=utf8;"; + var connStr = @"server=127.0.0.1;database=solar_power;user=root;password=000000;charset=utf8;"; this._connectionString = connStr; } diff --git a/SolarPower/Repository/Implement/PowerStationRepository.cs b/SolarPower/Repository/Implement/PowerStationRepository.cs index badd5d8..029c9e2 100644 --- a/SolarPower/Repository/Implement/PowerStationRepository.cs +++ b/SolarPower/Repository/Implement/PowerStationRepository.cs @@ -406,8 +406,7 @@ namespace SolarPower.Repository.Implement } } } - } - } + public async Task AddOperation(OperationInfo operation, List properties) { @@ -602,7 +601,7 @@ namespace SolarPower.Repository.Implement var trans = conn.BeginTransaction(); try { - var updateQuery = GenerateUpdateQueryOtherTable(properties, "device"); + var updateQuery = GenerateUpdateQueryWithCustomTable(properties, "device"); await conn.ExecuteAsync(updateQuery.ToString(), DeviceInfo, trans); trans.Commit(); }