From 5931e057b05c4fad5972e25273903c1cb0650eb6 Mon Sep 17 00:00:00 2001 From: dev02 Date: Thu, 14 Sep 2023 10:03:07 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E7=AB=AF]=20=E8=AA=BF=E6=95=B4?= =?UTF-8?q?=E5=BE=8C=E5=8F=B0=E5=90=8C=E6=AD=A5building=5Fmenu,=20?= =?UTF-8?q?=E8=AA=BF=E6=95=B4=E5=89=8D=E5=8F=B0=E9=81=B8=E5=96=AEapi?= =?UTF-8?q?=E8=B3=87=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/BuildController.cs | 2 +- .../Implement/NiagaraDataSynchronizeRepository.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FrontendWebApi/ApiControllers/BuildController.cs b/FrontendWebApi/ApiControllers/BuildController.cs index b52bcf7..d7dcebd 100644 --- a/FrontendWebApi/ApiControllers/BuildController.cs +++ b/FrontendWebApi/ApiControllers/BuildController.cs @@ -196,7 +196,7 @@ namespace FrontendWebApi.ApiControllers where ap.AuthType = 1 ) shower on shower.building_tag = me.building_tag and shower.ShowView = v2.id join building b on b.building_tag = me.building_tag and b.deleted = 0 and shower.building_tag = b.building_tag - where me.is_link = 1 + where me.is_link > 0 order by b.priority, v1.system_priority, me.priority, v2.system_priority, v2.created_at DESC", new { Account = account }); var floorsql = await backendRepository.GetAllAsync(@" diff --git a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs index cce94f4..e554cc8 100644 --- a/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs +++ b/Repository/BackendRepository/Implement/NiagaraDataSynchronizeRepository.cs @@ -702,7 +702,7 @@ namespace Repository.BackendRepository.Implement ) AS a ON b.building_tag COLLATE utf8mb4_0900_ai_ci = a.device_building_tag COLLATE utf8mb4_0900_ai_ci and a.device_system_tag COLLATE utf8mb4_0900_ai_ci = b.main_system_tag COLLATE utf8mb4_0900_ai_ci and a.device_name_tag COLLATE utf8mb4_0900_ai_ci = b.sub_system_tag COLLATE utf8mb4_0900_ai_ci SET b.is_link = 0 - WHERE a.device_building_tag IS NULL"); + WHERE a.device_building_tag IS NULL and b.is_link < 2"); using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled)) { await conn.ExecuteAsync(sb.ToString());