From c480e9ef3d5e1a0597e56fcadca92fec09b8f3c4 Mon Sep 17 00:00:00 2001 From: dev02 Date: Mon, 17 Oct 2022 17:45:27 +0800 Subject: [PATCH] fix sql --- Backend/Controllers/BuildMenuController.cs | 2 +- Backend/Controllers/DeviceManageController.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Backend/Controllers/BuildMenuController.cs b/Backend/Controllers/BuildMenuController.cs index ff1db9e..22bdc87 100644 --- a/Backend/Controllers/BuildMenuController.cs +++ b/Backend/Controllers/BuildMenuController.cs @@ -29,7 +29,7 @@ namespace Backend.Controllers try { - var sqlString = @$"select building_guid as Value, full_name as Name from building a where a.deleted = 0 and a.status = 0 ORDER BY A.priority ASC, A.created_at DESC"; + var sqlString = @$"select building_guid as Value, full_name as Name from building a where a.deleted = 0 and a.status = 0 ORDER BY a.priority ASC, a.created_at DESC"; KeyValue = await backendRepository.GetAllAsync(sqlString); apiResult.Code = "0000"; diff --git a/Backend/Controllers/DeviceManageController.cs b/Backend/Controllers/DeviceManageController.cs index 701cdbf..00c8da0 100644 --- a/Backend/Controllers/DeviceManageController.cs +++ b/Backend/Controllers/DeviceManageController.cs @@ -179,7 +179,7 @@ namespace Backend.Controllers dk.device_close_flashing, dk.device_error_flashing, (SELECT - STRING_AGG( ISNULL(system_key, ' '), ',') + GROUP_CONCAT( IFNULL(system_key, ' '), ',') FROM device_disaster dd JOIN variable v ON v.deleted = 0 AND v.system_type = 'disaster' AND v.system_value = dd.device_system_value WHERE dd.device_guid = d.device_guid