From 98f21b5813cf2f3e1cf1773865ceec999afa1ac6 Mon Sep 17 00:00:00 2001 From: dev02 Date: Thu, 2 Nov 2023 16:42:29 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E7=AB=AF]=20=E4=BF=AE=E6=94=B9sql=20?= =?UTF-8?q?commend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Controllers/SystemCategoryController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Backend/Controllers/SystemCategoryController.cs b/Backend/Controllers/SystemCategoryController.cs index 0ce5a7b..2964e7c 100644 --- a/Backend/Controllers/SystemCategoryController.cs +++ b/Backend/Controllers/SystemCategoryController.cs @@ -628,7 +628,7 @@ namespace Backend.Controllers // JOIN variable sv ON di.device_name_tag = sv.system_value // JOIN variable mv ON sv.system_parent_id = mv.id AND di.device_system_tag = mv.system_value // WHERE sv.id = @id AND di.deleted = @Deleted and di.device_building_tag = @building_tag and di.is_link = 1"; - var sql = @"SELECT min(di.id), di.full_name, di.points, di.unit, di.is_show, di.is_show_riserDiagram, di.is_controll, di.is_bool, di.is_link, di.is_show_history, di.device_system_tag, di.device_name_tag + var sql = @"SELECT min(di.id) as id, di.full_name, di.points, di.unit, di.is_show, di.is_show_riserDiagram, di.is_controll, di.is_bool, di.is_link, di.is_show_history, di.device_system_tag, di.device_name_tag FROM device_item di JOIN variable sv ON di.device_name_tag = sv.system_value JOIN variable mv ON sv.system_parent_id = mv.id AND di.device_system_tag = mv.system_value